Re: [PATCH] btrfs: use -f by default for mkfs as xfs/extN do
Eric Sandeen <[email protected]>
| Newsgroups | org.kernel.vger.fstests,org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
On 6/4/26 11:14 PM, Qu Wenruo wrote: > > > 在 2026/6/5 13:38, Christoph Hellwig 写道: >> On Tue, Jun 02, 2026 at 10:47:39PM -0500, Eric Sandeen wrote: >>> Recently saw a case where testing ext4, xfs, then btrfs failed all >>> btrfs tests because mkfs.btrfs refused to overwrite the left-over >>> xfs filesystem on $SCRATCH_DEV. >>> >>> This seems well-enough fixed by only making the change to _scratch_mkfs, >>> but several other helper functions explicitly use -f / -F for xfs >>> and extN, so I've updated them for btrfs as well. >> >> I haven't run into this yet, but it seem like btrfs needs this. >> But maybe you should also Cc the btrfs list? Yeah, sorry. > This is the wrong fix. > > It's caused by a mkfs.btrfs help string output change, and it's properly fixed by this patch which is already merged for a while: > > https://lore.kernel.org/linux-btrfs/[email protected]/ Oh, ugh. I did not know (ok: remember, because I wrote it in 2013) that we had a special helper function used only for a subset of filesystems, while hardcoding -f / -F on other filesystems. :( Anyway, this fix is still on for-next and I missed it, sorry about that. Thanks for the heads up. -Eric > Thanks, > Qu