Commit c431d38
ext4: extend ext4_mb_mark_context to support allocation under journal
Previously, ext4_mb_mark_context is only called under fast commit
replay path, so there is no valid handle when we update block bitmap
and group descriptor. This patch try to extend ext4_mb_mark_context
to be used by code under journal. There are several improvement:
1. Add "handle_t *handle" to struct ext4_mark_context to journal block
bitmap and group descriptor update inside ext4_mb_mark_context (the
added journal code is based on ext4_mb_mark_diskspace_used where
ext4_mb_mark_context is going to be used.)
2. Adds a flag argument to ext4_mb_mark_context() which controls
a. EXT4_MB_BITMAP_MARKED_CHECK - whether block bitmap checking is needed.
b. EXT4_MB_SYNC_UPDATE - whether dirty buffers (bitmap and group
descriptor) needs sync.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230928160407.142069-5-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 26d0f87 commit c431d38
1 file changed
Lines changed: 49 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3943 | 3943 | | |
3944 | 3944 | | |
3945 | 3945 | | |
| 3946 | + | |
| 3947 | + | |
3946 | 3948 | | |
3947 | | - | |
3948 | | - | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
3949 | 3952 | | |
3950 | 3953 | | |
3951 | 3954 | | |
3952 | 3955 | | |
3953 | 3956 | | |
3954 | 3957 | | |
3955 | | - | |
| 3958 | + | |
3956 | 3959 | | |
| 3960 | + | |
| 3961 | + | |
3957 | 3962 | | |
3958 | 3963 | | |
3959 | 3964 | | |
3960 | 3965 | | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
3961 | 3974 | | |
3962 | 3975 | | |
3963 | 3976 | | |
3964 | 3977 | | |
3965 | 3978 | | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
3966 | 3987 | | |
3967 | 3988 | | |
3968 | 3989 | | |
| |||
3971 | 3992 | | |
3972 | 3993 | | |
3973 | 3994 | | |
3974 | | - | |
3975 | | - | |
3976 | | - | |
3977 | | - | |
3978 | | - | |
3979 | | - | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
3980 | 4003 | | |
3981 | 4004 | | |
3982 | 4005 | | |
| |||
3991 | 4014 | | |
3992 | 4015 | | |
3993 | 4016 | | |
| 4017 | + | |
| 4018 | + | |
3994 | 4019 | | |
3995 | 4020 | | |
3996 | 4021 | | |
| |||
4003 | 4028 | | |
4004 | 4029 | | |
4005 | 4030 | | |
4006 | | - | |
| 4031 | + | |
4007 | 4032 | | |
4008 | 4033 | | |
4009 | | - | |
| 4034 | + | |
4010 | 4035 | | |
4011 | 4036 | | |
4012 | 4037 | | |
4013 | | - | |
4014 | | - | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
4015 | 4042 | | |
4016 | 4043 | | |
4017 | 4044 | | |
| |||
4171 | 4198 | | |
4172 | 4199 | | |
4173 | 4200 | | |
4174 | | - | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
4175 | 4206 | | |
4176 | 4207 | | |
4177 | 4208 | | |
| |||
6363 | 6394 | | |
6364 | 6395 | | |
6365 | 6396 | | |
6366 | | - | |
| 6397 | + | |
| 6398 | + | |
| 6399 | + | |
| 6400 | + | |
6367 | 6401 | | |
6368 | 6402 | | |
6369 | 6403 | | |
| |||
0 commit comments