]> www.infradead.org Git - nvme.git/commit
btrfs: enhance compression error messages
authorDavid Sterba <dsterba@suse.com>
Fri, 3 May 2024 11:42:30 +0000 (13:42 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:52:25 +0000 (15:52 +0200)
commitbe9438f0774c21e4de7c4905226c44830cac075a
treecc1d6e6f87965f2104bf71f81edbaaa396f71c67
parentca84529a842f3a15a5f17beac6252aa11955923f
btrfs: enhance compression error messages

Add more verbose and specific messages to all main error points in
compression code for all algorithms. Currently there's no way to know
which inode is affected or where in the data errors happened.

The messages follow a common format:

- what happened
- error code if relevant
- root and inode
- additional data like offsets or lengths

There's no helper for the messages as they differ in some details and
that would be cumbersome to generalize to a single function. As all the
errors are "almost never happens" there are the unlikely annotations
done as compression is hot path.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/lzo.c
fs/btrfs/zlib.c
fs/btrfs/zstd.c