diff options
author | Su Yue <suy.fnst@cn.fujitsu.com> | 2018-05-08 16:29:58 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-07 16:35:55 +0200 |
commit | d8020d5f6973f8c82db2f97de5354e50c28fc041 (patch) | |
tree | 6aad4d035cc22eaf7e8c7891dce17907079fac54 /check/mode-common.h | |
parent | 4fb23ea06f17924665e9316eb3c72fc21c1a8325 (diff) |
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 <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check/mode-common.h')
-rw-r--r-- | check/mode-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |