Re: [PATCH v3 1/3] rbd: do not attempt to use fast-diff if it's marked invalid

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

 



On 3/19/19 2:42 PM, jdillama@xxxxxxxxxx wrote:
From: Jason Dillaman <dillaman@xxxxxxxxxx>

The librbd API will transparently revert to a slow disk usage
calculation method if the fast-diff map is marked as invalid.

Signed-off-by: Jason Dillaman <dillaman@xxxxxxxxxx>
---
  src/storage/storage_backend_rbd.c | 41 ++++++++++++++++++++++++++++---
  1 file changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index 2b7af1db23..e67911f928 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -437,10 +437,29 @@ volStorageBackendRBDGetFeatures(rbd_image_t image,
  }
#if LIBRBD_VERSION_CODE > 265
+static int
+volStorageBackendRBDGetFlags(rbd_image_t image,
+                             const char *volname,
+                             uint64_t *flags)
+{
+    int r, ret = -1;
+
+    if ((r = rbd_get_flags(image, flags)) < 0) {
+        virReportSystemError(-r, _("failed to get the flags of RBD image "
+                                 "%s"), volname);
+        goto cleanup;
+    }
+    ret = 0;
+
+ cleanup:
+    return ret;
+}

I've simplified this a bit.

Michal

--
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]

  Powered by Linux