[PATCH] storage_backend_rbd: continue searching when failing in rbd_diff_iterate

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

 



From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>

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@xxxxxxxxx>
---
 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


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