Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 379c872

Browse files
fdmananakdave
authored andcommitted
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>
1 parent 4dc1d69 commit 379c872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/btrfs/extent_map.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ int btrfs_add_extent_mapping(struct btrfs_fs_info *fs_info,
634634
*em_in = NULL;
635635
WARN_ONCE(ret,
636636
"extent map merge error existing [%llu, %llu) with em [%llu, %llu) start %llu\n",
637-
existing->start, existing->len,
638-
orig_start, orig_len, start);
637+
existing->start, extent_map_end(existing),
638+
orig_start, orig_start + orig_len, start);
639639
}
640640
free_extent_map(existing);
641641
}

0 commit comments

Comments
 (0)