From: Trond Myklebust <trondmy@hammerspace.com>
To: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Question about clone_range() metadata stability
Date: Wed, 27 Nov 2019 18:38:46 +0000 [thread overview]
Message-ID: <f063089fb62c219ea6453c7b9b0aaafd50946dae.camel@hammerspace.com> (raw)
Hi all
A quick question about clone_range() and guarantees around metadata
stability.
Are users required to call fsync/fsync_range() after calling
clone_range() in order to guarantee that the cloned range metadata is
persisted? I'm assuming that it is required in order to guarantee that
data is persisted.
I'm asking because knfsd currently just does a call to
vfs_clone_file_range() when parsing a NFSv4.2 CLONE operation. It does
not call fsync()/fsync_range() on the destination file, and since the
NFSv4.2 protocol does not require you to perform any other operation in
order to persist data/metadata, I'm worried that we may be corrupting
the cloned file if the NFS server crashes at the wrong moment after the
client has been told the clone completed.
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next reply other threads:[~2019-11-27 18:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 18:38 Trond Myklebust [this message]
2019-11-27 20:21 ` Question about clone_range() metadata stability Darrick J. Wong
2019-11-29 12:43 ` Filipe Manana
2019-12-01 21:05 ` Dave Chinner
2019-12-02 17:09 ` Darrick J. Wong
2019-12-03 7:36 ` Trond Myklebust
2019-12-03 16:35 ` Darrick J. Wong
2019-12-03 23:00 ` Trond Myklebust
2019-12-06 1:31 ` 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=f063089fb62c219ea6453c7b9b0aaafd50946dae.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@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;
as well as URLs for NNTP newsgroup(s).