From: Christoph Hellwig <hch@infradead.org>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
Benjamin Coddington <bcodding@redhat.com>,
Tom Haynes <thomas.haynes@primarydata.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: Client never uses DATA_SYNC
Date: Thu, 6 Nov 2014 23:26:37 -0800 [thread overview]
Message-ID: <20141107072637.GA25215@infradead.org> (raw)
In-Reply-To: <20141106201341.GD22638@fieldses.org>
[adding Tom to Cc for a little spec clarification]
On Thu, Nov 06, 2014 at 03:13:41PM -0500, J. Bruce Fields wrote:
> > Makes sense to me.--b.
>
> Applying for 3.19.--b.
Looking at the specs again I have a little doubt about DATA_SYNC vs
NFSv4.
RFC3530, 14.2.36. sais:
"If stable is DATA_SYNC4,
then the server must commit all of the data to stable storage and
enough of the metadata to retrieve the data before returning."
So far so good, and exactly matches our fdatasync semantics, which
force out the inode itself, and any indirect blocks or extent tree
information, ignoring only time stamp updates.
But for NFSv4 there is a consideration that we don't have for local
access: the change attribute. For most exportable filesystems we
use the ctime timestamp for that, which does not get persisted by
fdatasync. Unfortunately the whole language about DATA_SYNC is
so vague that I'm tempted to withraw my patch due to this issue.
Note that for filesystems natively implementing the change attribute
(btrfs, XFSv5 and ext4 with a mount option) there is no difference anyway,
as they update the change attribute on every write, which doesn't
fall under the fdatasync umbrella, although I think it generally should,
as it would render fdatasync useless on thee otherwise.
Summary: a patch like mine above probably doesn't make sense, and
as far as I can tell we should deprecate use of DATA_SYNC4 for NFSv4,
because it cannot be different from FILE_SYNC4 due to the specification
for the change attribute.
next prev parent reply other threads:[~2014-11-07 7:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 15:47 Client never uses DATA_SYNC Benjamin Coddington
2014-11-04 20:38 ` Trond Myklebust
2014-11-05 8:53 ` Christoph Hellwig
2014-11-05 14:41 ` J. Bruce Fields
2014-11-06 20:13 ` J. Bruce Fields
2014-11-07 7:26 ` Christoph Hellwig [this message]
2014-11-07 15:53 ` J. Bruce Fields
2014-11-08 7:06 ` Christoph Hellwig
2014-11-19 20:55 ` J. Bruce Fields
2014-11-18 17:02 ` J. Bruce Fields
2014-11-20 5:48 ` 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=20141107072637.GA25215@infradead.org \
--to=hch@infradead.org \
--cc=bcodding@redhat.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=thomas.haynes@primarydata.com \
--cc=trond.myklebust@primarydata.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