]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove redundant auto reclaim log message
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 8 Jul 2025 06:55:02 +0000 (08:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 22:09:22 +0000 (00:09 +0200)
Remove the log message before reclaiming a chunk in
btrfs_reclaim_bgs_work(). Especially with automatic block-group
reclaiming these messages spam the kernel log.

Note there is also a tracepoint for the same condition to ease debugging.

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

index fb62a8cf03b32aa483df1432f6a74316ccf0a443..a5479c726e272886c001f2c649d8663492fc9b79 100644 (file)
@@ -1843,7 +1843,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
         */
        list_sort(NULL, &fs_info->reclaim_bgs, reclaim_bgs_cmp);
        while (!list_empty(&fs_info->reclaim_bgs)) {
-               u64 zone_unusable;
                u64 used;
                u64 reserved;
                int ret = 0;
@@ -1910,16 +1909,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
                        goto next;
                }
 
-               /*
-                * Cache the zone_unusable value before turning the block group
-                * to read only. As soon as the block group is read only it's
-                * zone_unusable value gets moved to the block group's read-only
-                * bytes and isn't available for calculations anymore. We also
-                * cache it before unlocking the block group, to prevent races
-                * (reports from KCSAN and such tools) with tasks updating it.
-                */
-               zone_unusable = bg->zone_unusable;
-
                spin_unlock(&bg->lock);
                spin_unlock(&space_info->lock);
 
@@ -1963,12 +1952,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
                reserved = bg->reserved;
                spin_unlock(&bg->lock);
 
-               btrfs_info(fs_info,
-       "reclaiming chunk %llu with %llu%% used %llu%% reserved %llu%% unusable",
-                               bg->start,
-                               div64_u64(used * 100, bg->length),
-                               div64_u64(reserved * 100, bg->length),
-                               div64_u64(zone_unusable * 100, bg->length));
                trace_btrfs_reclaim_block_group(bg);
                ret = btrfs_relocate_chunk(fs_info, bg->start);
                if (ret) {