btrfs-progs: check/original: Check and repair free space cache inode item

Just like lowmem mode, also check and repair free space cache inode
item.

And since we don't really have a good timing/function to check free
space chace inodes, we use the same common mode
check_repair_free_space_inode() when iterating root tree.

Signed-off-by: Qu Wenruo <wqu@suse.com>
master
Qu Wenruo 2019-04-01 13:55:50 +08:00
parent 77fe19ba16
commit 427990ad74
1 changed files with 11 additions and 0 deletions

View File

@ -3686,6 +3686,17 @@ again:
key.type == BTRFS_ROOT_BACKREF_KEY) {
process_root_ref(leaf, path.slots[0], &key,
root_cache);
} else if (key.type == BTRFS_INODE_ITEM_KEY &&
is_fstree(key.objectid)) {
ret = check_repair_free_space_inode(fs_info, &path);
if (ret < 0 && !path.nodes[0]) {
err = 1;
goto out;
}
if (ret < 0 && path.nodes[0]) {
err = 1;
goto next;
}
}
next:
path.slots[0]++;