Skip to content

Commit fc96959

Browse files
maharmstoneSasha Levin
authored andcommitted
btrfs: fix incorrect key offset in error message in check_dev_extent_item()
[ Upstream commit 511dc89 ] Fix the error message in check_dev_extent_item(), when an overlapping stripe is encountered. For dev extents, objectid is the disk number and offset the physical address, so prev_key->objectid should actually be prev_key->offset. (I can't take any credit for this one - this was discovered by Chris and his friend Claude.) Reported-by: Chris Mason <clm@fb.com> Fixes: 008e251 ("btrfs: tree-checker: add dev extent item checks") Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Mark Harmstone <mark@harmstone.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent fed7544 commit fc96959

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/tree-checker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ static int check_dev_extent_item(const struct extent_buffer *leaf,
18931893
if (unlikely(prev_key->offset + prev_len > key->offset)) {
18941894
generic_err(leaf, slot,
18951895
"dev extent overlap, prev offset %llu len %llu current offset %llu",
1896-
prev_key->objectid, prev_len, key->offset);
1896+
prev_key->offset, prev_len, key->offset);
18971897
return -EUCLEAN;
18981898
}
18991899
}

0 commit comments

Comments
 (0)