Skip to content
Commit 7ac8b88e authored by ethanwu's avatar ethanwu Committed by David Sterba
Browse files

btrfs: backref, only collect file extent items matching backref offset



When resolving one backref of type EXTENT_DATA_REF, we collect all
references that simply reference the EXTENT_ITEM even though their
(file_pos - file_extent_item::offset) are not the same as the
btrfs_extent_data_ref::offset we are searching for.

This patch adds additional check so that we only collect references whose
(file_pos - file_extent_item::offset) == btrfs_extent_data_ref::offset.

Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarethanwu <ethanwu@synology.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9da2b242
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