* [PATCH] btrfs-progs: balance: usage range filter not working
@ 2026-02-18 7:33 Illia Bobyr
2026-03-17 16:18 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Illia Bobyr @ 2026-02-18 7:33 UTC (permalink / raw)
To: linux-btrfs; +Cc: Illia Bobyr
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] btrfs-progs: balance: usage range filter not working
2026-02-18 7:33 [PATCH] btrfs-progs: balance: usage range filter not working Illia Bobyr
@ 2026-03-17 16:18 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2026-03-17 16:18 UTC (permalink / raw)
To: Illia Bobyr; +Cc: linux-btrfs
On Tue, Feb 17, 2026 at 11:33:24PM -0800, Illia Bobyr wrote:
> 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>
Added to devel, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-17 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 7:33 [PATCH] btrfs-progs: balance: usage range filter not working Illia Bobyr
2026-03-17 16:18 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox