From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Chris Murphy <lists@colorremedies.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Should cp default to reflink?
Date: Tue, 7 Nov 2017 07:30:49 -0500 [thread overview]
Message-ID: <d16b6352-976a-7b10-604c-5800bd575c27@gmail.com> (raw)
In-Reply-To: <CAJCQCtSY+nso=URaU+2-qN2EWrxA7m1djcWhUAJTmjxW0yGa8Q@mail.gmail.com>
On 2017-11-06 17:37, Chris Murphy wrote:
> I'm doing copies from one subvolume to another, through a mounted top
> level (id5) at /mnt/int.
>
> This copies the whole file conventionally (no shared extents)
> $ sudo cp /mnt/int/home/chris/Downloads/Fedora-Server-dvd-x86_64-27-1.6.iso
> /mnt/int/root00/var/lib/libvirt/images/
>
> This is a reflink copy
> $ sudo cp --reflink
> /mnt/int/home/chris/Downloads/Fedora-Server-dvd-x86_64-27-1.6.iso
> /mnt/int/root00/var/lib/libvirt/images/
>
> This is also a refink copy, with the original removed.
> $ sudo mv /mnt/int/home/chris/Downloads/Fedora-Server-dvd-x86_64-27-1.6.iso
> /mnt/int/root00/var/lib/libvirt/images/
>
> Seems to me any request to duplicate should be optimized by default
> with an auto reflink when possible, and require an explicit option to
> inhibit.
I would argue that it probably should, with the caveat that it
absolutely should be well documented. I've been using an alias to
achieve this for months now on most of my systems with no issues, so I
can say with some confidence that it works. Ideally, I'd love to see a
similar patch for busybox, but that's not really essential for this
(though having a quick easy way to call the clone ioctl in btrfs-progs
itself would be nice as a alternative).
There may however be some wailing and gnashing of teeth from those who
have convinced themselves that a completely independent copy of a file
on the same filesystem constitutes a backup and that they need such backups.
next prev parent reply other threads:[~2017-11-07 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 22:37 Should cp default to reflink? Chris Murphy
2017-11-07 4:56 ` Marat Khalili
2017-11-07 12:30 ` Austin S. Hemmelgarn [this message]
2017-11-07 12:51 ` Dmitrii Tcvetkov
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=d16b6352-976a-7b10-604c-5800bd575c27@gmail.com \
--to=ahferroin7@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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).