aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKemeng Shi <[email protected]>2023-09-29 00:04:01 +0800
committerTheodore Ts'o <[email protected]>2023-10-05 22:32:15 -0400
commit33e728c67db6b7e72fc8d09f7a38f72302b8a98d (patch)
treeac4309d1c79a3328b72a02a169b7be373fa85d65 /tools
parent2f94711b098bc55285ac74aba2f2b83fd72b555f (diff)
ext4: Separate block bitmap and buddy bitmap freeing in ext4_mb_clear_bb()
This patch separates block bitmap and buddy bitmap freeing in order to update block bitmap with ext4_mb_mark_context in following patch. Separated freeing is safe with concurrent allocation as long as: 1. Firstly allocate block in buddy bitmap, and then in block bitmap. 2. Firstly free block in block bitmap, and then buddy bitmap. Then freed block will only be available to allocation when both buddy bitmap and block bitmap are updated by freeing. Allocation obeys rule 1 already, just do sperated freeing with rule 2. Separated freeing has no race with generate_buddy as: Once ext4_mb_load_buddy_gfp is executed successfully, the update-to-date buddy page can be found in sbi->s_buddy_cache and no more buddy initialization of the buddy page will be executed concurrently until buddy page is unloaded. As we always do free in "load buddy, free, unload buddy" sequence, separated freeing has no race with generate_buddy. Signed-off-by: Kemeng Shi <[email protected]> Reviewed-by: "Ritesh Harjani (IBM)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions