All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Anna.Schumaker@netapp.com,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] fs: try to clone files first in vfs_copy_file_range
Date: Tue, 29 Nov 2016 09:55:25 +0100	[thread overview]
Message-ID: <20161129085525.GA6024@lst.de> (raw)
In-Reply-To: <CAOQ4uxh15Z=zOuDSk9ojkKWG2DNrtpvHKNTWygDja0qZ13hrBw@mail.gmail.com>

[fullquote removed, please get your email etiquette right or I'll stop
responding]


> For fs that support both copy and clone, I am not convinced that it up to
> VFS to take that decision for the application.

We had that discussion many times.  Yes, the system can decide it, as
the application does not see the difference.

> If application 'chose' copy over clone maybe it had a reason.

Yes, because it's lazy and simply doesn't give a f**k how the data
is copied.  Clone provides much stronger guarantees, but if you don't
need them you'll just use call that will always work.

> I suggest to move this to 'clone fallback' after copy_file_range and before
> do_splice_direct.

That won't do the right thing for the NFS case.

> A hypothetical case why copy_range implementation would be preferred
> by an application that runs over specific hypothetical fs - copy_file_range
> can be more easily implemented as a killable copy loop, returning the length
> that was copy before interrupted by a signal.

Clone is a fast metadata operation and is finished before you even
had a chance to kill it.

  reply	other threads:[~2016-11-29  8:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25  8:40 make copy_file_range do the right thing Christoph Hellwig
2016-11-25  8:40 ` [PATCH] fs: try to clone files first in vfs_copy_file_range Christoph Hellwig
2016-11-29  5:15   ` Amir Goldstein
2016-11-29  8:55     ` Christoph Hellwig [this message]
2016-11-29 10:28       ` Amir Goldstein
2016-11-29 12:08         ` 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=20161129085525.GA6024@lst.de \
    --to=hch@lst.de \
    --cc=Anna.Schumaker@netapp.com \
    --cc=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.