btrfs: make the bg_reclaim_threshold per-space info
authorJosef Bacik <josef@toxicpanda.com>
Tue, 29 Mar 2022 08:56:06 +0000 (01:56 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:11 +0000 (17:03 +0200)
commitbb5a098d9791f184899499531ff4411089e2a5e0
tree2fd6a2374e9fcd2f10ff674a6698f0580d6a6a64
parenta7bb6bd4bd7ff0440f238deb3510a1037a26f7bc
btrfs: make the bg_reclaim_threshold per-space info

For non-zoned file systems it's useful to have the auto reclaim feature,
however there are different use cases for non-zoned, for example we may
not want to reclaim metadata chunks ever, only data chunks.  Move this
sysfs flag to per-space_info.  This won't affect current users because
this tunable only ever did anything for zoned, and that is currently
hidden behind BTRFS_CONFIG_DEBUG.

Tested-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ jth restore global bg_reclaim_threshold ]
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/free-space-cache.c
fs/btrfs/space-info.c
fs/btrfs/space-info.h
fs/btrfs/sysfs.c
fs/btrfs/zoned.h