btrfs-progs: map-logical: Use btrfs_next_extent_item

btrfs_next_extent_item() looks for BTRFS_EXTENT_ITEM_KEY and
BTRFS_METADATA_KEY, which are the types we're looking for.

Signed-off-by: James Harvey <jamespharvey20@gmail.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
james harvey 2018-06-07 03:20:02 -04:00 committed by David Sterba
parent 078e9a1cc9
commit ef00e4264c
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ again:
ret = btrfs_previous_extent_item(fs_info->extent_root,
path, 0);
else
ret = btrfs_next_item(fs_info->extent_root, path);
ret = btrfs_next_extent_item(fs_info->extent_root,
path, 0);
if (ret)
goto out;
goto again;