From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Dykstra <dwd@cern.ch>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] fuse2fs: mount norecovery if main block device is readonly
Date: Fri, 17 Oct 2025 16:30:57 -0700 [thread overview]
Message-ID: <20251017233057.GK6170@frogsfrogsfrogs> (raw)
In-Reply-To: <aPKk8N1_ssr3f6Zd@cern.ch>
On Fri, Oct 17, 2025 at 03:20:00PM -0500, Dave Dykstra wrote:
> On Fri, Oct 17, 2025 at 12:38:41PM -0700, Darrick J. Wong wrote:
> > On Thu, Oct 16, 2025 at 02:34:18PM -0500, Dave Dykstra wrote:
> ...
> > > > + err_printf(ff, "%s.\n",
> > > > + _("read-only device, trying to mount norecovery"));
> > > > + flags &= ~EXT2_FLAG_RW;
> > > > + ff->ro = 1;
> > > > + ff->norecovery = 1;
> > >
> > > I don't think it's good to switch to read-only+norecovery even when a
> > > read-write mode was requested. That goes too far.
> >
> > The block device cannot be opened for write, so the mount cannot allow
> > user programs to write to files, and the fs driver cannot recover the
> > journal and it cannot write to the disk. The only other choice would
> > be to fail the mount.
>
> Yes, I think it's better to fail the mount if recovery is needed and it
> can't be done.
>
> > norecovery is wrong though. The kernel fails the mount if the journal
> > needs recovery, the block device is ro, and the user didn't specify
> > norecovery.
>
> That makes more sense.
>
> > > It also doesn't catch when recovery is needed.
> >
> > What specifically do you mean "catch when recovery is needed"? 68 lines
> > down from the ext2fs_open2 call is a check for the needsrecovery state,
> > followed by recovering the journal.
>
> I meant that it should fail in that case because it can't recover.
>
> > > My proposed patch only reopens read-only
> > > when ro was requested and then later checks to see if recovery is needed
> > > and if so, errors out.
> >
> > Your patch also didn't re-check the feature support after reopening the
> > block device, which you dismissed even though that can lead to
> > catastrophic behavior.
>
> In this version of the patch there is no reopening, there is only a
> switch to open without RW if the RW open fails. So all feature checks
> happen after it.
Well I'm struggling to reshuffle my patch deck to keep up with you.
I already _had_ patches to fix every thing you've mentioned, but since
you pre-declared you wouldn't make time even to go look at my patch
stack why the hell am I even bothering?
I no longer have patience for these interactions.
--D
> Dave
>
next prev parent reply other threads:[~2025-10-17 23:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 23:59 [PATCHSET 4/6] fuse2fs: use fuseblk mode Darrick J. Wong
2025-09-16 0:03 ` [PATCH 1/2] fuse2fs: mount norecovery if main block device is readonly Darrick J. Wong
2025-10-16 19:34 ` Dave Dykstra
2025-10-17 19:38 ` Darrick J. Wong
2025-10-17 20:20 ` Dave Dykstra
2025-10-17 23:30 ` Darrick J. Wong [this message]
2025-09-16 0:03 ` [PATCH 2/2] fuse2fs: use fuseblk mode for mounting filesystems Darrick J. Wong
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=20251017233057.GK6170@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=dwd@cern.ch \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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