libvirt/src/storage
John Ferlan f1856eb622 Restore skipping of setting capacity
Commit id 'ac9a0963' refactored out the 'withCapacity' for the
virStorageBackendUpdateVolInfo() API.  See:

http://www.redhat.com/archives/libvir-list/2014-April/msg00043.html

This resulted in a difference in how 'virsh vol-info --pool <poolName>
<volume>' or 'virsh vol-list vol-list --pool <poolName> --details' outputs
the capacity information for a directory pool with a qcow2 sparse file.

For example, using the following XML

mkdir /home/TestPool
cat testpool.xml
<pool type='dir'>
  <name>TestPool</name>
  <uuid>6bf80895-10b6-75a6-6059-89fdea2aefb7</uuid>
  <source>
  </source>
  <target>
    <path>/home/TestPool</path>
    <permissions>
      <mode>0755</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

virsh pool-create testpool.xml
virsh vol-create-as --pool TestPool temp_vol_1 \
      --capacity 1048576 --allocation 1048576 --format qcow2
virsh vol-info --pool TestPool temp_vol_1

Results in listing a Capacity value.  Prior to the commit, the value would
be '1.0 MiB' (1048576 bytes). However, after the commit the output would be
(for example) '192.50 KiB', which for my system was the size of the volume
in my file system (eg 'ls -l TestPool/temp_vol_1' results in '197120' bytes
or 192.50 KiB). While perhaps technically correct, it's not necessarily
what the user expected (certainly virt-test didn't expect it).

This patch restores the code to not update the target capacity for this path
2014-05-02 07:11:05 -04:00
..
parthelper.c util: move virFile* functions from virutil.c to virfile.c 2013-05-10 13:09:30 -04:00
storage_backend_disk.c Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_backend_disk.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_fs.c Restore skipping of setting capacity 2014-05-02 07:11:05 -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 Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_backend_gluster.h storage: Add storage file backends for gluster 2014-02-14 11:07:23 +01:00
storage_backend_iscsi.c storage: use virDirRead API 2014-04-28 17:52:46 -06:00
storage_backend_iscsi.h Move functions using iscsiadm to viriscsi.c 2014-03-20 18:04:50 +01:00
storage_backend_logical.c Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_backend_logical.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_mpath.c Restore skipping of setting capacity 2014-05-02 07:11:05 -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_backend_rbd: Correct argument order to rbd_create3 2014-04-28 22:11:09 -06:00
storage_backend_rbd.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_scsi.c Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_backend_scsi.h storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend 2013-04-08 18:41:06 +08:00
storage_backend_sheepdog.c conf: track sizes directly in source struct 2014-04-02 06:03:00 -06: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.c Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_backend.h Restore skipping of setting capacity 2014-05-02 07:11:05 -04:00
storage_driver.c storage: Refactor location of metadata for storage drive access to files 2014-04-09 14:34:19 +02:00
storage_driver.h storage: Refactor location of metadata for storage drive access to files 2014-04-09 14:34:19 +02:00