All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: David Sterba <dsterba@suse.cz>
Cc: Josef Bacik <josef@toxicpanda.com>,
	Naohiro Aota <Naohiro.Aota@wdc.com>,
	Pankaj Raghav <p.raghav@samsung.com>,
	"linux-btrfs @ vger . kernel . org" <linux-btrfs@vger.kernel.org>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v2 3/4] btrfs: change the bg_reclaim_threshold valid region from 0 to 100
Date: Tue, 29 Mar 2022 01:56:08 -0700	[thread overview]
Message-ID: <aa24975c08590da46606fdce7473d05dad67e9fc.1648543951.git.johannes.thumshirn@wdc.com> (raw)
In-Reply-To: <cover.1648543951.git.johannes.thumshirn@wdc.com>

From: Josef Bacik <josef@toxicpanda.com>

For the !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.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 90da1ea0cae0..fdf9bf789528 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -746,7 +746,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);
-- 
2.35.1


  parent reply	other threads:[~2022-03-29  8:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29  8:56 [PATCH v2 0/4] btrfs: rework background block group relocation Johannes Thumshirn
2022-03-29  8:56 ` [PATCH v2 1/4] btrfs: make the bg_reclaim_threshold per-space info Johannes Thumshirn
2022-03-29  8:56 ` [PATCH v2 2/4] btrfs: allow block group background reclaim for !zoned fs'es Johannes Thumshirn
2022-03-29  8:56 ` Johannes Thumshirn [this message]
2022-03-29  8:56 ` [PATCH v2 4/4] btrfs: zoned: make auto-reclaim less aggressive Johannes Thumshirn
2022-03-30 15:22   ` Pankaj Raghav
2022-04-04 15:48   ` David Sterba
2022-04-04 15:50 ` [PATCH v2 0/4] btrfs: rework background block group relocation David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa24975c08590da46606fdce7473d05dad67e9fc.1648543951.git.johannes.thumshirn@wdc.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=p.raghav@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.