linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: Christoph Hellwig <hch@infradead.org>
Cc: Anna Schumaker <Anna.Schumaker@netapp.com>,
	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
Subject: Re: [PATCH v6 5/4] copy_file_range.2: New page documenting copy_file_range()
Date: Mon, 19 Oct 2015 16:45:03 -0400	[thread overview]
Message-ID: <20151019204503.GA15214@fieldses.org> (raw)
In-Reply-To: <20151018183013.GA11200@infradead.org>

On Sun, Oct 18, 2015 at 11:30:13AM -0700, Christoph Hellwig wrote:
> 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.

So, continue to include a "flags" field but just error out if it's
anything but zero for now?

Sounds fine by me.  We can always implement the other stuff later.

--b.

> 
> 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.

  reply	other threads:[~2015-10-19 20:45 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
2015-10-19 20:45     ` J. Bruce Fields [this message]
     [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=20151019204503.GA15214@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Anna.Schumaker@netapp.com \
    --cc=andros@netapp.com \
    --cc=clm@fb.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --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).