public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: xfs_clear_incompat_log_features considered harmful?
Date: Mon, 5 Feb 2024 21:23:29 -0800	[thread overview]
Message-ID: <20240206052329.GR616564@frogsfrogsfrogs> (raw)
In-Reply-To: <ZcCEBkVrMUBeXu78@infradead.org>

On Sun, Feb 04, 2024 at 10:45:26PM -0800, Christoph Hellwig wrote:
> On Mon, Feb 05, 2024 at 12:09:23PM +1100, Dave Chinner wrote:
> > The issue arises if the host tries to mount the guest VM image to
> > configure the clone of a golden image prior to first start. If there
> > are log incompat fields set in the golden image that was generated
> > by a newer kernel/OS image builder then the provisioning
> > host cannot mount the filesystem even though the log is clean and
> > recovery is unnecessary to mount the filesystem.
> 
> Well, even with the current code base in Darrick's queue a mount alone
> won't upgrade features, you need to do an explicit exchrange or online
> repair operation.  And I think we should basically never do log or
> other format incompatible changes without an explicit user action.

Should I add a flags bit to the ioctls so that programs can force them
on if the process has CAP_SYS_ADMIN?  Or would you rather a mount option
"-o allow_log_upgrades=1" so that's totally under control of whoever
writes fstab?

The first option probably turns into an "and now everyone sets this"
thing; the second one clutters up the mount options.

> The only exception would be if the feature is so old that we finally
> want to get rid of the old implementation, in which case we can think
> of automatically doing the upgrade with a big fat warning.

Heh, we're probably going to have to do that with bigtime come 2035.

> > Hence on unmount we really want the journal contents based log
> > incompat bits cleared because there is nothing incompatible in the
> > log and so there is no reason to prevent older kernels from
> > mounting the filesytsem.
> 
> Doing the clearing at unmount time only (and maybe freeze if someone
> really cares) sounds perfectly fine.

Ugh, I only want to do this at umount time if I can get away with it.
Freeze is already hard enough to grok.

--D

  reply	other threads:[~2024-02-06  5:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 23:00 xfs_clear_incompat_log_features considered harmful? Darrick J. Wong
2024-02-01  4:33 ` Christoph Hellwig
2024-02-05  1:09 ` Dave Chinner
2024-02-05  6:45   ` Christoph Hellwig
2024-02-06  5:23     ` Darrick J. Wong [this message]
2024-02-09  6:33       ` Christoph Hellwig
2024-02-06  5:30   ` Darrick J. Wong
2024-02-07  0:14     ` Dave Chinner

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=20240206052329.GR616564@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /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