summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_map.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2024-03-13 13:02:02 +0000
committerDavid Sterba <dsterba@suse.com>2024-03-26 16:42:39 +0100
commit379c87239320a204138995e1da35ce9eca239e7a (patch)
tree71e552cc2bc1fd192651b23fb46aa9e7e77890b0 /fs/btrfs/extent_map.c
parent4dc1d69c2b101eee0bf071187794ffed2f9c2596 (diff)
downloadlinux-379c87239320a204138995e1da35ce9eca239e7a.tar.gz
linux-379c87239320a204138995e1da35ce9eca239e7a.tar.bz2
linux-379c87239320a204138995e1da35ce9eca239e7a.zip
btrfs: fix message not properly printing interval when adding extent map
At btrfs_add_extent_mapping(), if we are unable to merge the existing extent map, we print a warning message that suggests interval ranges in the form "[X, Y)", where the first element is the inclusive start offset of a range and the second element is the exclusive end offset. However we end up printing the length of the ranges instead of the exclusive end offsets. So fix this by printing the range end offsets. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r--fs/btrfs/extent_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 2cfc6e8cf76f..16685cb8a91d 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -634,8 +634,8 @@ int btrfs_add_extent_mapping(struct btrfs_fs_info *fs_info,
*em_in = NULL;
WARN_ONCE(ret,
"extent map merge error existing [%llu, %llu) with em [%llu, %llu) start %llu\n",
- existing->start, existing->len,
- orig_start, orig_len, start);
+ existing->start, extent_map_end(existing),
+ orig_start, orig_start + orig_len, start);
}
free_extent_map(existing);
}