]> git.hungrycats.org Git - linux/commitdiff
btrfs: tree-checker: print dev extent offset in error message
authorFilipe Manana <fdmanana@suse.com>
Thu, 10 Sep 2026 16:37:48 +0000 (17:37 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Sep 2026 12:55:53 +0000 (14:55 +0200)
If a dev extent's offset is not sector size aligned, the error message is
printing the dev extent's objectid instead of the offset. This is a copy
paste error, as before this check we check the objectid field.

Fixes: 008e2512dc56 ("btrfs: tree-checker: add dev extent item checks")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c

index b8ca9980e1ddd225c90389278842d5e1ef72e9c0..ea12d09732065421c97fca6ef2bc9e5d77a82bcb 100644 (file)
@@ -2171,7 +2171,7 @@ static int check_dev_extent_item(const struct extent_buffer *leaf,
                                 sectorsize))) {
                generic_err(leaf, slot,
                            "invalid dev extent chunk offset, has %llu not aligned to %u",
-                           btrfs_dev_extent_chunk_objectid(leaf, de),
+                           btrfs_dev_extent_chunk_offset(leaf, de),
                            sectorsize);
                return -EUCLEAN;
        }