summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-03-29 10:56:08 +0200
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:03:11 +0200
commitef972e7b5edeec9ed5213476186ceae5798b01e8 (patch)
tree2a9012f542c7e9b57a42d4ab585efcdbd9206954 /fs/btrfs/sysfs.c
parentbtrfs: allow block group background reclaim for non-zoned filesystems (diff)
downloadlinux-ef972e7b5edeec9ed5213476186ceae5798b01e8.tar.xz
linux-ef972e7b5edeec9ed5213476186ceae5798b01e8.zip
btrfs: change the bg_reclaim_threshold valid region from 0 to 100
For the non-zoned case we may want to set the threshold for reclaim to something below 50%. Change the acceptable threshold from 50-100 to 0-100. Tested-by: Pankaj Raghav <p.raghav@samsung.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r--fs/btrfs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index b9fdb220ed2b..92a1fa8e3da6 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -744,7 +744,7 @@ static ssize_t btrfs_sinfo_bg_reclaim_threshold_store(struct kobject *kobj,
if (ret)
return ret;
- if (thresh != 0 && (thresh <= 50 || thresh > 100))
+ if (thresh < 0 || thresh > 100)
return -EINVAL;
WRITE_ONCE(space_info->bg_reclaim_threshold, thresh);