]> xenbits.xensource.com Git - libvirt.git/commit
Fix cloning of raw, sparse volumes
authorPrerna Saxena <prerna@linux.vnet.ibm.com>
Fri, 26 Jun 2015 11:43:26 +0000 (17:13 +0530)
committerJán Tomko <jtomko@redhat.com>
Fri, 10 Jul 2015 06:54:10 +0000 (08:54 +0200)
commitdd519a294b22646b8dab26627707a525556df4d4
tree66ed19b09da0edf279af0aeffb0405539db7c3b0
parente30297b0969895ba6859aaa281ca8b88323cad6a
Fix cloning of raw, sparse volumes

When virsh vol-clone is attempted on a raw file where capacity > allocation,
the resulting cloned volume has a size that matches the virtual-size of
the parent; in place of matching its actual, disk size.
This patch fixes the cloned disk to have same _allocated_size_ as
the parent file from which it was cloned.

Ref: http://www.redhat.com/archives/libvir-list/2015-May/msg00050.html

Also fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1130739

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_backend.c
src/storage/storage_driver.c