]> xenbits.xensource.com Git - libvirt.git/commit
rbd: Use RBD fast-diff for querying actual volume allocation
authorWido den Hollander <wido@widodh.nl>
Thu, 11 Feb 2016 16:04:17 +0000 (17:04 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 12 Feb 2016 21:02:05 +0000 (16:02 -0500)
commit98782f88991a390a358cea960b5776f72fc14451
tree7f73f5caeba6f64552a6190d913b0afda5fb27de
parentab342e99f6cb853cab6586ba5c4272f2fa543353
rbd: Use RBD fast-diff for querying actual volume allocation

Since Ceph version Infernalis (9.2.0) the new fast-diff mechanism
of RBD allows for querying actual volume usage.

Prior to this version there was no easy and fast way to query how
much allocation a RBD volume had inside a Ceph cluster.

To use the fast-diff feature it needs to be enabled per RBD image
and is only supported by Ceph cluster running version Infernalis
(9.2.0) or newer.

Without the fast-diff feature enabled libvirt will report an allocation
identical to the image capacity. This is how libvirt behaves currently.

'virsh vol-info rbd/image2' might output for example:

  Name:           image2
  Type:           network
  Capacity:       1,00 GiB
  Allocation:     124,00 MiB

Newly created volumes will have the fast-diff feature enabled if the
backing Ceph cluster supports it.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
src/storage/storage_backend_rbd.c