Linux-NFS Archive on
 help / color / Atom feed
* Question about clone_range() metadata stability
@ 2019-11-27 18:38 Trond Myklebust
  2019-11-27 20:21 ` Darrick J. Wong
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2019-11-27 18:38 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-nfs

Hi all

A quick question about clone_range() and guarantees around metadata

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.

Trond Myklebust
Linux NFS client maintainer, Hammerspace

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 18:38 Question about clone_range() metadata stability Trond Myklebust
2019-11-27 20:21 ` 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

Linux-NFS Archive on

Archives are clonable:
	git clone --mirror linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ \
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone