From: Illia Bobyr <illia.bobyr@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Illia Bobyr <illia.bobyr@gmail.com>
Subject: [PATCH] btrfs-progs: balance: usage range filter not working
Date: Tue, 17 Feb 2026 23:33:24 -0800 [thread overview]
Message-ID: <20260218073357.3897563-1-illia.bobyr@gmail.com> (raw)
When range support was added to the usage filter, a bug was
introduced, as `BTRFS_BALANCE_ARGS_USAGE` is set unconditionally, even
when `BTRFS_BALANCE_ARGS_USAGE_RANGE` is also set.
If `BTRFS_BALANCE_ARGS_USAGE` is set, `BTRFS_BALANCE_ARGS_USAGE_RANGE` is
ignored, see `fs/btrfs/volumes.c:should_balance_chunk()`.
Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com>
---
cmds/balance.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/cmds/balance.c b/cmds/balance.c
index 25c5e..d6296 100644
--- a/cmds/balance.c
+++ b/cmds/balance.c
@@ -141,7 +141,6 @@ static int parse_filters(char *filters, struct btrfs_balance_args *args)
args->flags &= ~BTRFS_BALANCE_ARGS_USAGE_RANGE;
args->flags |= BTRFS_BALANCE_ARGS_USAGE;
}
- args->flags |= BTRFS_BALANCE_ARGS_USAGE;
} else if (strcmp(this_char, "devid") == 0) {
if (!value || !*value) {
error("the devid filter requires an argument");
--
2.51.0
next reply other threads:[~2026-02-18 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 7:33 Illia Bobyr [this message]
2026-03-17 16:18 ` [PATCH] btrfs-progs: balance: usage range filter not working 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=20260218073357.3897563-1-illia.bobyr@gmail.com \
--to=illia.bobyr@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox