btrfs: don't print relocation messages from auto reclaim
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 8 Jul 2025 06:55:03 +0000 (08:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 22:09:22 +0000 (00:09 +0200)
commit5ae011bcbb5ac088e5fa41fcaf3896fc866c0b9a
tree6f3de81d90cc1193d52884bafba91468ef23bf78
parenta507904090d05904dda4fbcd3413e63c29d24057
btrfs: don't print relocation messages from auto reclaim

When BTRFS is doing automatic block-group reclaim, it is spamming the
kernel log messages a lot.

Add a 'verbose' parameter to btrfs_relocate_chunk() and
btrfs_relocate_block_group() to control the verbosity of these log
message. This way the old behaviour of printing log messages on a
user-space initiated balance operation can be kept while excessive log
spamming due to auto reclaim is mitigated.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/relocation.c
fs/btrfs/relocation.h
fs/btrfs/volumes.c
fs/btrfs/volumes.h