Re: [PATCH] storage: use btrfs file clone ioctl when possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 27, 2013 at 05:02:53PM +0300, Oskari Saarenmaa wrote:
> Btrfs provides a copy-on-write clone ioctl so let's try to use it instead
> of copying files block by block.  The ioctl is executed unconditionally if
> it's available and we fall back to block copying if it fails, similarly to
> cp --reflink=auto.

Currently the virStorageVolCreateXMLFrom method does a full allocation
of storage when cloning volumes. This means applications can rely on
the image having enough space when clone completes and won't get ENOSPC
in the VM. AFAICT, this change to do copy-on-write changes the API to do
thin provisioning of the storage during clone, so any future write on
either the new or old volume may generate ENOSPC when btrfs finally copies
the sector. I don't think this is a good thing. I think applications
should have to explicitly request copy-on-write behaviour for the clone
so they know the implications.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]