On 2017-09-12 13:21, Adam Borowski wrote:
On Tue, Sep 12, 2017 at 02:26:39PM +0300, Marat Khalili wrote:
On 12/09/17 14:12, Adam Borowski wrote:
Why would you need support in the hypervisor if cp --reflink=always is
enough?
+1 :)
But I've already found one problem: I use rsync snapshots for backups, and
although rsync does have --sparse argument, apparently it conflicts with
--inplace. You cannot have all nice things :(
(Replying here to the above, as I can't seem to find the original in my
e-mail client to reply to)
--inplace and --sparse are inherently at odds with each other. The only
way that they could work together is if rsync was taught about the
FALLOCATE_PUNCH_HOLES ioctl, and that isn't likely to ever happen
because it's Linux specific (at least, it's functionally Linux
specific). Without that ioctl, the only way to create a sparse file is
to seek over areas that are supposed to be empty when writing the file
out initially, but you can't do that with an existing file because you
then have old data where you're supposed to have zeroes.
There's fallocate -d, but that for some reason touches mtime which makes
rsync go again. This can be handled manually but is still not nice.It touches mtime because it updates the block allocations, which in turn
touch ctime, which on most (possibly all, not sure though) POSIX systems
implies an mtime update. It's essentially the same as truncate updating
the mtime when you extend the file, the only difference is that the
FALLOCATE_PUNCH_HOLES ioctl doesn't change the file size.
--
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