From: Josef Bacik Date: Tue, 29 Mar 2022 08:56:08 +0000 (-0700) Subject: btrfs: change the bg_reclaim_threshold valid region from 0 to 100 X-Git-Tag: v6.6.17~7062^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef972e7b5edeec9ed5213476186ceae5798b01e8;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index b9fdb22..92a1fa8 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);