From: Jeff Layton <jlayton@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: David Howells <dhowells@redhat.com>,
Christian Brauner <brauner@kernel.org>,
viro@zeniv.linux.org.uk, linux-afs@lists.infradead.org,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
ceph-devel@vger.kernel.org,
"trond.myklebust" <trond.myklebust@hammerspace.com>
Subject: Re: [PATCH 1/4] vfs: report change attribute in statx for IS_I_VERSION inodes
Date: Tue, 16 Aug 2022 12:05:48 -0400 [thread overview]
Message-ID: <d741f144c798c3ef877b9d5e5d0c37d028245915.camel@kernel.org> (raw)
In-Reply-To: <Yvu9HsCgzwpEYhPc@magnolia>
On Tue, 2022-08-16 at 08:51 -0700, Darrick J. Wong wrote:
> On Tue, Aug 16, 2022 at 11:32:24AM -0400, Jeff Layton wrote:
> > On Tue, 2022-08-16 at 16:15 +0100, David Howells wrote:
> > > Jeff Layton <jlayton@kernel.org> wrote:
> > >
> > > > I think we'll just have to ensure that before we expose this for any
> > > > filesystem that it conforms to some minimum standards. i.e.: it must
> > > > change if there are data or metadata changes to the inode, modulo atime
> > > > changes due to reads on regular files or readdir on dirs.
> > > >
> > > > The local filesystems, ceph and NFS should all be fine. I guess that
> > > > just leaves AFS. If it can't guarantee that, then we might want to avoid
> > > > exposing the counter for it.
> > >
> > > AFS monotonically increments the counter on data changes; doesn't make any
> > > change for metadata changes (other than the file size).
> > >
> > > But you can't assume NFS works as per your suggestion as you don't know what's
> > > backing it (it could be AFS, for example - there's a converter for that).
> > >
> >
> > In that case, the NFS server must synthesize a proper change attr. The
> > NFS spec mandates that it change on most metadata changes.
> >
> > > Further, for ordinary disk filesystems, two data changes may get elided and
> > > only increment the counter once.
> > >
> >
> > Not a problem as long as nothing queried the counter in between the
> > changes.
> >
> > > And then there's mmap...
> > >
> >
> > Not sure how that matters here.
> >
> > > It might be better to reduce the scope of your definition and just say that it
> > > must change if there's a data change and may also be changed if there's a
> > > metadata change.
> > >
> >
> > I'd prefer that we mandate that it change on metadata changes as well.
>
> ...in that case, why not leave the i_version bump in
> xfs_trans_log_inode? That will capture all changes to file data,
> attribues, and metadata. ;)
>
>
Because that includes changes to the atime due to reads which should be
specifically omitted. We could still keep that callsite instead, if you
can see some way to exclude those.
In practice, we are using a change to i_version to mean that "something
changed" in the inode, which usually implies a change to the ctime and
mtime.
Trond pointed out that the NFSv4 spec implies that time_access updates
should be omitted from what we consider to be "metadata" here:
https://mailarchive.ietf.org/arch/msg/nfsv4/yrRBMrVwWWDCrgHPAzq_yAEc7BU/
IMA (which is the only other in-kernel consumer of i_version) also wants
the same behavior.
> > That's what most of the in-kernel users want, and what most of the
> > existing filesystems provide. If AFS can't give that guarantee then we
> > can just omit exposing i_version on it.
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2022-08-16 16:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 13:27 [PATCH 0/4] vfs: expose the inode change attribute via statx Jeff Layton
2022-08-16 13:27 ` [PATCH 1/4] vfs: report change attribute in statx for IS_I_VERSION inodes Jeff Layton
2022-08-16 13:44 ` Christian Brauner
2022-08-16 13:52 ` Jeff Layton
2022-08-16 13:55 ` David Howells
2022-08-16 14:02 ` Jeff Layton
2022-08-16 15:15 ` David Howells
2022-08-16 15:32 ` Jeff Layton
2022-08-16 15:51 ` Darrick J. Wong
2022-08-16 16:05 ` Jeff Layton [this message]
2022-08-18 20:24 ` Jeff Layton
2022-08-16 13:27 ` [PATCH 2/4] nfs: report the change attribute if requested Jeff Layton
2022-08-16 13:27 ` [PATCH 3/4] afs: fill out change attribute in statx replies Jeff Layton
2022-08-16 13:27 ` [PATCH 4/4] ceph: fill in the change attribute in statx requests Jeff Layton
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=d741f144c798c3ef877b9d5e5d0c37d028245915.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=brauner@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
--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