libvirt/src/storage
John Ferlan 2c52ec43aa storage: Fix regression cloning volume into a logical pool
https://bugzilla.redhat.com/show_bug.cgi?id=1318993

Commit id 'dd519a294' caused a regression cloning a volume into a
logical pool by removing just the 'allocation' adjustment during
storageVolCreateXMLFrom. Combined with the change to not require the
new volume input XML to have a capacity listed (commit id 'e3f1d2a8')
left the possibility that a zero allocation value (e.g., not provided)
would create a thin/sparse logical volume. When a thin lv becomes fully
populated, then LVM sets the partition 'inactive' and the subsequent
fdatasync() fails.

Add a new 'has_allocation' flag to be set at XML parse time to indicate
that allocation was provided. This is done so that if it's not provided
the create-from code uses the capacity value since we document that if
omitted, the volume will be fully allocated at time of creation.

For a logical backend, that creation time is 'createVol', while for a
file backend, creation doesn't set the size, but the 'createRaw' called
during buildVolFrom will decide whether the file is sparse or not based
on the provided capacity and allocation value.

For volume clones that provide different allocation and capacity values
to allow for sparse files, there is no change.
2016-05-11 09:06:26 -04:00
..
parthelper.c util: Add virGettextInitialize, convert the code 2016-04-14 13:22:40 -04:00
storage_backend_disk.c storage: Add new flag for libvirt_parthelper 2016-01-19 13:02:59 -05:00
storage_backend_disk.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_fs.c storage: drop the plumbing needed for kvm-img/qcow-create 2016-04-20 08:59:57 -04:00
storage_backend_fs.h storage: add file functions for local and block files 2014-02-14 10:47:57 +01:00
storage_backend_gluster.c ploop: Fix build with gluster 2016-04-15 18:09:18 +02:00
storage_backend_gluster.h storage: Add storage file backends for gluster 2014-02-14 11:07:23 +01:00
storage_backend_iscsi.c iscsi: do not fail to stop a stopped pool 2015-04-30 13:05:10 +02:00
storage_backend_iscsi.h Move functions using iscsiadm to viriscsi.c 2014-03-20 18:04:50 +01:00
storage_backend_logical.c Revert "logical: Only raw volumes are supported" 2016-03-27 11:09:53 -04:00
storage_backend_logical.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_mpath.c storage: mpath: Don't error on target_type=NULL 2016-04-14 12:52:45 -04:00
storage_backend_mpath.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
storage_backend_rbd.c storage: rbd: Fix build 2016-03-29 08:51:33 +02:00
storage_backend_rbd.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_scsi.c Change virDevicePCIAddress to virPCIDeviceAddress 2016-05-02 15:46:23 +02:00
storage_backend_scsi.h storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend 2013-04-08 18:41:06 +08:00
storage_backend_sheepdog.c sheepdog: Use a consistent error message 2016-03-21 08:46:54 +03:00
storage_backend_sheepdog.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
storage_backend_zfs.c ZFS: Support sparse volumes 2016-04-17 07:32:27 +03:00
storage_backend_zfs.h storage: ZFS support 2014-08-12 19:40:20 +04:00
storage_backend.c secret: Change virSecretDef variable names 2016-04-25 15:45:29 -04:00
storage_backend.h storage: drop the plumbing needed for kvm-img/qcow-create 2016-04-20 08:59:57 -04:00
storage_driver.c storage: Fix regression cloning volume into a logical pool 2016-05-11 09:06:26 -04:00
storage_driver.h storage: Introduce virStoragePoolObjFindPoolByUUID 2015-11-12 06:30:32 -05:00