btrfs-progs: lowmem check: Fix false backref lost warning for keyed extent data ref

For keyed extent ref, its offset is calculated offset (file offset -
file extent offset), just like inlined extent data ref.

However the code is using file offset to hash extent data ref offset,
causing false backref lost warning like:
------
ERROR: data extent[16913485824 7577600] backref lost
------

Fixes: b0d360b541 ("btrfs-progs: check: introduce function to check data backref in extent tree")
Reported-by: Chris Murphy <chris@colorremedies.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2017-11-22 17:03:18 +08:00 committed by David Sterba
parent 7cf15bcc6a
commit 7a382c8ce0
1 changed files with 1 additions and 1 deletions

View File

@ -12126,7 +12126,7 @@ static int check_extent_data_item(struct btrfs_root *root,
dbref_key.objectid = btrfs_file_extent_disk_bytenr(eb, fi);
dbref_key.type = BTRFS_EXTENT_DATA_REF_KEY;
dbref_key.offset = hash_extent_data_ref(root->objectid,
fi_key.objectid, fi_key.offset);
fi_key.objectid, fi_key.offset - offset);
ret = btrfs_search_slot(NULL, root->fs_info->extent_root,
&dbref_key, &path, 0, 0);