From: Christoph Hellwig <hch@infradead.org>
To: Anna Schumaker <Anna.Schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
zab@zabbo.net, viro@zeniv.linux.org.uk, clm@fb.com,
darrick.wong@oracle.com, mtk.manpages@gmail.com,
andros@netapp.com, hch@infradead.org
Subject: Re: [PATCH v6 5/4] copy_file_range.2: New page documenting copy_file_range()
Date: Sun, 18 Oct 2015 11:30:13 -0700 [thread overview]
Message-ID: <20151018183013.GA11200@infradead.org> (raw)
In-Reply-To: <1445029707-31549-6-git-send-email-Anna.Schumaker@Netapp.com>
Just commenting on the man page here as the comment is about sematics.
All the infrastructure in the patch looks reasonable to me, but this
is something we need to get right.
> +.B COPY_FR_REFLINK
> +Create a lightweight "reflink", where data is not copied until
> +one of the files is modified.
> +.PP
> +The default behavior
> +.RI ( flags
> +== 0) is to perform a full data copy of the requested range.
> +.SH RETURN VALUE
> +Upon successful completion,
> +.BR copy_file_range ()
> +will return the number of bytes copied between files.
> +This could be less than the length originally requested.
As mentioned in the previous discussion I fundamentally disagree with
the way your word the flags here.
flags = 0 gives you the data from source at dest, period. How it's
implemented is up to the file system as a user cannot observe how data
actually is stored underneath.
Additionaly I think the 'clone' option with it's stronger guarantees
should be a separate system call. So for now just have no supported
flag and leave it up to the file system and storage device how to
implement it.
For the future a COPY_FALLOC flag taht guaranatees you do not get ENOSPC
on the copied range will be very useful, but given the complexity I
think it's not something we should add now.
next prev parent reply other threads:[~2015-10-18 18:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 21:08 [PATCH v6 0/4] VFS: In-kernel copy system call Anna Schumaker
2015-10-16 21:08 ` [PATCH v6 1/4] vfs: add copy_file_range syscall and vfs helper Anna Schumaker
2015-10-16 21:08 ` [PATCH v6 2/4] x86: add sys_copy_file_range to syscall tables Anna Schumaker
[not found] ` <1445029707-31549-1-git-send-email-Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-10-16 21:08 ` [PATCH v6 3/4] btrfs: add .copy_file_range file operation Anna Schumaker
2015-10-16 21:08 ` [PATCH v6 4/4] vfs: Add vfs_copy_file_range() support for pagecache copies Anna Schumaker
2015-10-16 21:08 ` [PATCH v6 5/4] copy_file_range.2: New page documenting copy_file_range() Anna Schumaker
[not found] ` <1445029707-31549-6-git-send-email-Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-10-16 21:21 ` Andreas Dilger
2015-10-16 21:42 ` Pádraig Brady
2015-10-18 18:30 ` Christoph Hellwig [this message]
2015-10-19 20:45 ` J. Bruce Fields
[not found] ` <20151019204503.GA15214-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2015-10-19 21:03 ` Christoph Hellwig
2015-10-20 9:41 ` [PATCH v6 0/4] VFS: In-kernel copy system call Zhao Lei
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=20151018183013.GA11200@infradead.org \
--to=hch@infradead.org \
--cc=Anna.Schumaker@netapp.com \
--cc=andros@netapp.com \
--cc=clm@fb.com \
--cc=darrick.wong@oracle.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@zabbo.net \
/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).