* [PATCH 0/2] btrfs-progs: add extra points to warn about extra chunk profiles
@ 2026-11-19 3:20 Qu Wenruo
2026-11-19 3:20 ` [PATCH 1/2] btrfs-progs: always check if the fs has multiple profiles after balance Qu Wenruo
2026-11-19 3:20 ` [PATCH 2/2] btrfs-progs: warn about multiple profiles after dev-replace Qu Wenruo
0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-11-19 3:20 UTC (permalink / raw)
To: linux-btrfs
This is inspired by a private user report, that after replacing a
missing device from a degraded RAID1 fs, the fs can no longer tolerate
missing the old good device.
It turns out that during dev-replace, a new system chunk is created, and
since dev-replace destination can not be utilized for chunk allocation,
the new system chunk is SINGLE, thus can no longer tolerate missing that
device.
We need a better solution to this long existing SINGLE-chunk problem,
but for now at least warn the user about this for both balance (success
path) and dev-replace.
Qu Wenruo (2):
btrfs-progs: always check if the fs has multiple profiles after
balance
btrfs-progs: warn about multiple profiles after dev-replace
cmds/balance.c | 1 +
cmds/replace.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] btrfs-progs: always check if the fs has multiple profiles after balance
2026-11-19 3:20 [PATCH 0/2] btrfs-progs: add extra points to warn about extra chunk profiles Qu Wenruo
@ 2026-11-19 3:20 ` Qu Wenruo
2026-11-19 3:20 ` [PATCH 2/2] btrfs-progs: warn about multiple profiles after dev-replace Qu Wenruo
1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-11-19 3:20 UTC (permalink / raw)
To: linux-btrfs
Currently btrfs-progs will give an warning if the fs has multiple
different profiles for DATA/METADATA/SYSTEM chunks.
However this only covers canceled/paused balance, not a normally
finished balance.
But it's very simple to get mutliple profiles using filters.
E.g. limit= or usage= with convert= filters will only convert part of
the chunks.
So add such warning to cover the finished/error cases.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
cmds/balance.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmds/balance.c b/cmds/balance.c
index 96ae04d6da7a..673cd6dd4632 100644
--- a/cmds/balance.c
+++ b/cmds/balance.c
@@ -365,6 +365,7 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args,
args->stat.completed, args->stat.considered);
}
+ btrfs_warn_multiple_profiles(fd);
out:
close(fd);
return ret;
--
2.56.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] btrfs-progs: warn about multiple profiles after dev-replace
2026-11-19 3:20 [PATCH 0/2] btrfs-progs: add extra points to warn about extra chunk profiles Qu Wenruo
2026-11-19 3:20 ` [PATCH 1/2] btrfs-progs: always check if the fs has multiple profiles after balance Qu Wenruo
@ 2026-11-19 3:20 ` Qu Wenruo
1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-11-19 3:20 UTC (permalink / raw)
To: linux-btrfs
There is a private user report that, after replacing a missing device
from a degraded RAID1 raid, the fs is unable to tolerant a missing
device anymore.
It turns out that a new SINGLE system chunk is created during that
dev-replace, which will reject mounts if that device is missing.
We have several sub-commands that will warn about such situation, e.g.
"btrfs filesystem" and "btrfs balance".
Add "btrfs replace start" to also do the warning before exiting.
This warning will be output even if we failed to start replace, this is
not the worst thing, as the end user have more chance to note the
unexpected profiles.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
cmds/replace.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmds/replace.c b/cmds/replace.c
index bd17ea94842b..bb89fcc0d4f3 100644
--- a/cmds/replace.c
+++ b/cmds/replace.c
@@ -355,13 +355,16 @@ static int cmd_replace_start(const struct cmd_struct *cmd,
goto leave_with_error;
}
}
+ btrfs_warn_multiple_profiles(fdmnt);
close(fdmnt);
return 0;
leave_with_error:
free(dstdev);
- if (fdmnt != -1)
+ if (fdmnt != -1) {
+ btrfs_warn_multiple_profiles(fdmnt);
close(fdmnt);
+ }
if (fddstdev != -1)
close(fddstdev);
return 1;
--
2.56.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-19 3:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 3:20 [PATCH 0/2] btrfs-progs: add extra points to warn about extra chunk profiles Qu Wenruo
2026-11-19 3:20 ` [PATCH 1/2] btrfs-progs: always check if the fs has multiple profiles after balance Qu Wenruo
2026-11-19 3:20 ` [PATCH 2/2] btrfs-progs: warn about multiple profiles after dev-replace Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox