From: "J. Bruce Fields" <bfields@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Trond Myklebust <trondmy@hammerspace.com>,
Anna Schumaker <schumakeranna@gmail.com>,
Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH 2/3] nfsd: move change attribute generation to filesystem
Date: Fri, 22 Jan 2021 09:47:53 -0500 [thread overview]
Message-ID: <20210122144753.GA52753@pick.fieldses.org> (raw)
In-Reply-To: <20210122082059.GA119852@infradead.org>
On Fri, Jan 22, 2021 at 08:20:59AM +0000, Christoph Hellwig wrote:
> On Thu, Jan 21, 2021 at 03:27:56PM -0500, J. Bruce Fields wrote:
> > I also have a vague idea that some filesystem-specific improvements
> > might be possible. (E.g., if a filesystem had some kind of boot count
> > in the superblock, maybe that would be a better way to prevent the
> > change attribute from going backwards on reboot than the thing
> > generic_fetch_iversion is currently doing with ctime. But I have no
> > concrete plan there, maybe I'm dreaming.)
>
> Even without the ctime i_version never goes backward, what is the
> problem here?
Suppose a modification bumps the change attribute, a client reads
the new value of the change attribute before it's committed to disk,
then the server crashes. After the server comes back up, the client
requests the change attribute again and sees an older value.
That's actually not too bad. What I'd mainly like to avoid is
incrementing the change attribute further and risking reuse of an old
value for a different new state of the file.
Which is why generic_fetch_iversion is adding the ctime in the higher
bits.
So we depend on good time for correctness. Trond has had some concerns
about that.
Something like a boot counter might be more reliable.
Another interesting case is after restore from backup.
--b.
next prev parent reply other threads:[~2021-01-22 14:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 19:24 [PATCH 0/3] NFS change attribute patches J. Bruce Fields
2021-01-19 19:24 ` [PATCH 1/3] nfs: use change attribute for NFS re-exports J. Bruce Fields
2021-01-19 19:24 ` [PATCH 2/3] nfsd: move change attribute generation to filesystem J. Bruce Fields
2021-01-20 8:46 ` Christoph Hellwig
2021-01-21 20:27 ` J. Bruce Fields
2021-01-22 8:20 ` Christoph Hellwig
2021-01-22 14:47 ` J. Bruce Fields [this message]
2021-01-22 17:32 ` Christoph Hellwig
2021-01-22 18:46 ` J. Bruce Fields
2021-01-29 19:25 ` J. Bruce Fields
2021-01-29 19:26 ` [PATCH 1/2 v2] nfs: use change attribute for NFS re-exports J. Bruce Fields
2021-01-29 19:27 ` [PATCH 2/2 v2] nfsd: skip some unnecessary stats in the v4 case J. Bruce Fields
2021-01-30 6:02 ` Christoph Hellwig
2021-01-29 20:43 ` [PATCH 1/2 v2] nfs: use change attribute for NFS re-exports Chuck Lever
2021-01-30 6:02 ` Christoph Hellwig
2021-01-19 19:24 ` [PATCH 3/3] nfsd: skip some unnecessary stats in the v4 case J. Bruce Fields
2021-01-22 17:34 ` [PATCH 0/3] NFS change attribute patches Christoph Hellwig
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=20210122144753.GA52753@pick.fieldses.org \
--to=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=schumakeranna@gmail.com \
--cc=trondmy@hammerspace.com \
/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