Re: [PATCH] btrfs: use -f by default for mkfs as xfs/extN do

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
On Fri, Jun 05, 2026 at 01:44:02PM +0930, 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?
> 
> 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]/

In other words: we already get -f, but it got broken recently.  That
explains why things always worked for me.

I took me a bit to reverse-engineers this from your answer :)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.