From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Eric Sandeen <sandeen@sandeen.net>,
Christoph Hellwig <hch@infradead.org>,
Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] fs: i_version mntopt gets visible through /proc/mounts
Date: Wed, 17 Jun 2020 23:33:33 -0400 [thread overview]
Message-ID: <20200618033333.py7dikfbu6sryzjd@gabell> (raw)
In-Reply-To: <20200618014429.GS11245@magnolia>
On Wed, Jun 17, 2020 at 06:44:29PM -0700, Darrick J. Wong wrote:
> On Wed, Jun 17, 2020 at 09:30:26PM -0400, Masayoshi Mizuma wrote:
> > On Wed, Jun 17, 2020 at 02:45:07PM -0400, J. Bruce Fields wrote:
> > > On Wed, Jun 17, 2020 at 01:28:11PM -0500, Eric Sandeen wrote:
> > > > but mount(8) has already exposed this interface:
> > > >
> > > > iversion
> > > > Every time the inode is modified, the i_version field will be incremented.
> > > >
> > > > noiversion
> > > > Do not increment the i_version inode field.
> > > >
> > > > so now what?
> > >
> > > It's not like anyone's actually depending on i_version *not* being
> > > incremented. (Can you even observe it from userspace other than over
> > > NFS?)
> > >
> > > So, just silently turn on the "iversion" behavior and ignore noiversion,
> > > and I doubt you're going to break any real application.
> >
> > I suppose it's probably good to remain the options for user compatibility,
> > however, it seems that iversion and noiversiont are useful for
> > only ext4.
> > How about moving iversion and noiversion description on mount(8)
> > to ext4 specific option?
> >
> > And fixing the remount issue for XFS (maybe btrfs has the same
> > issue as well)?
> > For XFS like as:
> >
> > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> > index 379cbff438bc..2ddd634cfb0b 100644
> > --- a/fs/xfs/xfs_super.c
> > +++ b/fs/xfs/xfs_super.c
> > @@ -1748,6 +1748,9 @@ xfs_fc_reconfigure(
> > return error;
> > }
> >
> > + if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5)
> > + mp->m_super->s_flags |= SB_I_VERSION;
> > +
>
> I wonder, does this have to be done at the top of this function because
> the vfs already removed S_I_VERSION from s_flags?
Ah, I found the above code doesn't work...
sb->s_flags will be updated after reconfigure():
int reconfigure_super(struct fs_context *fc)
{
...
if (fc->ops->reconfigure) {
retval = fc->ops->reconfigure(fc);
if (retval) {
if (!force)
goto cancel_readonly;
/* If forced remount, go ahead despite any errors */
WARN(1, "forced remount of a %s fs returned %i\n",
sb->s_type->name, retval);
}
}
WRITE_ONCE(sb->s_flags, ((sb->s_flags & ~fc->sb_flags_mask) |
(fc->sb_flags & fc->sb_flags_mask)));
Here, fc->sb_flags_mask should be MS_RMT_MASK, so SB_I_VERSION will be
dropped except iversion mount opstion (MS_I_VERSION) is set.
- Masa
next prev parent reply other threads:[~2020-06-18 3:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 20:21 [PATCH] fs: i_version mntopt gets visible through /proc/mounts Masayoshi Mizuma
2020-06-17 8:03 ` Christoph Hellwig
2020-06-17 13:33 ` Masayoshi Mizuma
2020-06-17 15:58 ` J. Bruce Fields
2020-06-17 17:14 ` Eric Sandeen
2020-06-17 17:24 ` Darrick J. Wong
2020-06-17 17:55 ` Eric Sandeen
2020-06-17 18:18 ` J. Bruce Fields
2020-06-17 18:28 ` Eric Sandeen
2020-06-17 18:45 ` J. Bruce Fields
2020-06-18 1:30 ` Masayoshi Mizuma
2020-06-18 1:44 ` Darrick J. Wong
2020-06-18 3:33 ` Masayoshi Mizuma [this message]
2020-06-18 3:05 ` Dave Chinner
2020-06-18 3:45 ` Masayoshi Mizuma
2020-06-18 22:39 ` Dave Chinner
2020-06-19 2:20 ` J. Bruce Fields
2020-06-19 2:44 ` Dave Chinner
2020-06-19 12:04 ` Jeff Layton
2020-06-19 20:40 ` J. Bruce Fields
2020-06-19 22:10 ` Dave Chinner
2020-06-19 22:28 ` J. Bruce Fields
2020-06-20 1:49 ` Dave Chinner
2020-06-20 1:56 ` J. Bruce Fields
2020-06-20 17:00 ` Eric Sandeen
2020-06-20 17:09 ` J. Bruce Fields
2020-06-20 23:54 ` Dave Chinner
2020-06-22 21:26 ` J. Bruce Fields
2020-06-22 22:03 ` Dave Chinner
2020-06-19 13:17 ` Christoph Hellwig
2020-07-13 23:45 ` Eric Sandeen
2020-07-14 8:30 ` Christoph Hellwig
2020-07-14 20:26 ` Eric Sandeen
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=20200618033333.py7dikfbu6sryzjd@gabell \
--to=msys.mizuma@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=bfields@fieldses.org \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=m.mizuma@jp.fujitsu.com \
--cc=sandeen@sandeen.net \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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