From d8020d5f6973f8c82db2f97de5354e50c28fc041 Mon Sep 17 00:00:00 2001 From: Su Yue Date: Tue, 8 May 2018 16:29:58 +0800 Subject: btrfs-progs: check: lowmem: exclude extents of metadata blocks Commit d17d6663c99c ("btrfs-progs: lowmem check: Fix regression which screws up extent allocator") removes pin_metadata_blocks() from lowmem repair. So we have to find another way to exclude extents which should be occupied by existing tree blocks. Modify pin_down_tree_blocks() and rename it to traverse_tree_blocks for sharing code with new function exclude_metadata_blocks(). * exclude_metadata_blocks() traverses and marks extents of all tree blocks dirty in fs_info->excluded_extents. * cleanup_excluded_extents() is responsible for cleanup. Export them to mode-common.h since they will be used both in original and lowmem modes. Signed-off-by: Su Yue Signed-off-by: David Sterba --- check/mode-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'check/mode-common.h') diff --git a/check/mode-common.h b/check/mode-common.h index 65d2ae41..a4748578 100644 --- a/check/mode-common.h +++ b/check/mode-common.h @@ -99,5 +99,7 @@ int check_child_node(struct extent_buffer *parent, int slot, struct extent_buffer *child); void reset_cached_block_groups(struct btrfs_fs_info *fs_info); int pin_metadata_blocks(struct btrfs_fs_info *fs_info); +int exclude_metadata_blocks(struct btrfs_fs_info *fs_info); +void cleanup_excluded_extents(struct btrfs_fs_info *fs_info); #endif -- cgit v1.2.3