Commit 0ebb6bbb authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: tree-checker: check for BTRFS_BLOCK_FLAG_FULL_BACKREF being set improperly

We need to validate that a data extent item does not have the
FULL_BACKREF flag set on its flags.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent eb6b7fb4
......@@ -1290,6 +1290,11 @@ static int check_extent_item(struct extent_buffer *leaf,
key->offset, fs_info->sectorsize);
return -EUCLEAN;
}
if (unlikely(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) {
extent_err(leaf, slot,
"invalid extent flag, data has full backref set");
return -EUCLEAN;
}
}
ptr = (unsigned long)(struct btrfs_extent_item *)(ei + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment