Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: remove redundant auto reclaim log message

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>

authored by

Johannes Thumshirn and committed by
David Sterba
a5079040 240fafaa

-17
-17
fs/btrfs/block-group.c
··· 1843 1843 */ 1844 1844 list_sort(NULL, &fs_info->reclaim_bgs, reclaim_bgs_cmp); 1845 1845 while (!list_empty(&fs_info->reclaim_bgs)) { 1846 - u64 zone_unusable; 1847 1846 u64 used; 1848 1847 u64 reserved; 1849 1848 int ret = 0; ··· 1909 1910 goto next; 1910 1911 } 1911 1912 1912 - /* 1913 - * Cache the zone_unusable value before turning the block group 1914 - * to read only. As soon as the block group is read only it's 1915 - * zone_unusable value gets moved to the block group's read-only 1916 - * bytes and isn't available for calculations anymore. We also 1917 - * cache it before unlocking the block group, to prevent races 1918 - * (reports from KCSAN and such tools) with tasks updating it. 1919 - */ 1920 - zone_unusable = bg->zone_unusable; 1921 - 1922 1913 spin_unlock(&bg->lock); 1923 1914 spin_unlock(&space_info->lock); 1924 1915 ··· 1952 1963 reserved = bg->reserved; 1953 1964 spin_unlock(&bg->lock); 1954 1965 1955 - btrfs_info(fs_info, 1956 - "reclaiming chunk %llu with %llu%% used %llu%% reserved %llu%% unusable", 1957 - bg->start, 1958 - div64_u64(used * 100, bg->length), 1959 - div64_u64(reserved * 100, bg->length), 1960 - div64_u64(zone_unusable * 100, bg->length)); 1961 1966 trace_btrfs_reclaim_block_group(bg); 1962 1967 ret = btrfs_relocate_chunk(fs_info, bg->start); 1963 1968 if (ret) {