]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: make error messages more clear when getting a chunk map
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Nov 2023 13:38:33 +0000 (13:38 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 23 Nov 2023 21:27:46 +0000 (22:27 +0100)
commit7d410d5efe04e42a6cd959bfe6d59d559fdf8b25
treee93d993c9353b5b1e5adbe74711d58ff72899836
parent5fba5a571858ce2d787fdaf55814e42725bfa895
btrfs: make error messages more clear when getting a chunk map

When getting a chunk map, at btrfs_get_chunk_map(), we do some sanity
checks to verify we found a chunk map and that map found covers the
logical address the caller passed in. However the messages aren't very
clear in the sense that don't mention the issue is with a chunk map and
one of them prints the 'length' argument as if it were the end offset of
the requested range (while the in the string format we use %llu-%llu
which suggests a range, and the second %llu-%llu is actually a range for
the chunk map). So improve these two details in the error messages.

CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Josef Bacik <josef@toxicpanda.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/volumes.c