linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	"Pádraig Brady" <P@draigBrady.com>
Cc: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Anna Schumaker
	<Anna.Schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-btrfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	zab-ugsP4Wv/S6ZeoWH0uzbU5w@public.gmane.org,
	viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	clm-b10kYP2dOMg@public.gmane.org,
	darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	andros-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()
Date: Tue, 27 Oct 2015 07:34:23 -0400	[thread overview]
Message-ID: <562F613F.9070609@gmail.com> (raw)
In-Reply-To: <20151026214110.GA9232-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

On 2015-10-26 17:41, J. Bruce Fields wrote:
> On Mon, Oct 26, 2015 at 12:19:33PM +0000, Pádraig Brady wrote:
>> I get the impression that you think reflinking should be hidden
>> from the user, i.e. cp(1) should not have had the --reflink option
>> (for the last 6 years)?  I'm not convinced of that, and even so
>> I think lower level interfaces would benefit from finer grained options.
>> This would be especially useful since there is no general interface
>> to reflink at present. I was happy with the reflink control options,
>> thinking the extra control could allow cp to use this by default.
>
> Maybe that's a case for Christoph's "clone" operation.
>
> I agree with him that it makes sense to allow the filesystem to
> implement "copy" using reflink or similar tricks under the covers.  And
> that in fact it's difficult to imagine how you'd prevent that in the
> presence of layers of filesystem or block protocols underneath.
>
> That "cp" flag seems strange to me, but if "cp" wants to take advantage
> of a copy system call while continuing to make something like that
> distinction then I suppose it could fallocate the destination range file
> after the copy.
FWIW, I'm pretty sure that the '--reflink=never' option was added 
originally just for those poor misguided people who don't understand 
that deduplication is perfectly safe as long as you do it right. 
Personally, I really hope that Busybox and the other Coreutils 
replacements don't make that mistake, as the very fact that cp allows 
you to force it not to reflink things indirectly implies that it isn't 
safe in some circumstances, which is completely bogus WRT all the 
filesystems in Linux that support it if they are used properly.

If you want to make sure the space is allocated on disk, you should be 
using fallocate (or dd, or something equivalent), not cp.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  parent reply	other threads:[~2015-10-27 11:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 19:32 [PATCH v7 0/4] VFS: In-kernel copy system call Anna Schumaker
2015-10-23 19:32 ` [PATCH v7 3/4] btrfs: add .copy_file_range file operation Anna Schumaker
2015-10-23 19:32 ` [PATCH v7 4/4] vfs: Add vfs_copy_file_range() support for pagecache copies Anna Schumaker
     [not found] ` <1445628736-13058-1-git-send-email-Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-10-23 19:32   ` [PATCH v7 1/4] vfs: add copy_file_range syscall and vfs helper Anna Schumaker
     [not found]     ` <1445628736-13058-2-git-send-email-Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-10-27 16:03       ` Steve French
2015-10-23 19:32   ` [PATCH v7 2/4] x86: add sys_copy_file_range to syscall tables Anna Schumaker
2015-10-23 19:32   ` [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range() Anna Schumaker
2015-10-24 12:02     ` Pádraig Brady
     [not found]       ` <562B734D.50800-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2015-10-26  3:39         ` Christoph Hellwig
     [not found]           ` <20151026033925.GA9945-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-10-26 12:19             ` Pádraig Brady
2015-10-26 21:41               ` J. Bruce Fields
     [not found]                 ` <20151026214110.GA9232-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2015-10-27 11:34                   ` Austin S Hemmelgarn [this message]
2015-10-24  6:21 ` [PATCH v7 0/4] VFS: In-kernel copy system call Christoph Hellwig
2015-10-24 16:52 ` Eric Biggers
2015-10-25  5:23   ` Andreas Dilger
2015-10-26  3:45   ` 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=562F613F.9070609@gmail.com \
    --to=ahferroin7-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Anna.Schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=P@draigBrady.com \
    --cc=andros-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=clm-b10kYP2dOMg@public.gmane.org \
    --cc=darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-btrfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=zab-ugsP4Wv/S6ZeoWH0uzbU5w@public.gmane.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).