[libvirt] [PATCH] storage_backend_rbd: continue searching when failing in rbd_diff_iterate

Chen Hanxiao chen_han_xiao at 126.com
Tue Sep 6 03:45:06 UTC 2016


From: Chen Hanxiao <chenhanxiao at gmail.com>

We try to find a snapshot that had no different between
the current state of RBD image.
If we failed in rbd_diff_iterate, just continue for the
next search iteration.

Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
---
 src/storage/storage_backend_rbd.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index 4dd4b24..2756c83 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -831,9 +831,10 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t image,
 #endif
 
         if (r < 0) {
-            virReportSystemError(-r, _("failed to iterate RBD snapshot %s@%s"),
-                                 imgname, snaps[i].name);
-            goto cleanup;
+            VIR_DEBUG("failed to iterate RBD snapshot %s@%s,"
+                      " rbd_diff return %d",
+                      imgname, snaps[i].name, r);
+            continue;
         }
 
         /* If diff is still set to zero we found a snapshot without deltas */
-- 
1.8.3.1





More information about the libvir-list mailing list