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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html