]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: allow ProgressCtx::update_progress to cancel maintenance ops
authorJason Dillaman <dillaman@redhat.com>
Tue, 16 Jul 2019 02:12:08 +0000 (22:12 -0400)
committerJason Dillaman <dillaman@redhat.com>
Sun, 18 Aug 2019 20:46:58 +0000 (16:46 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 026df758aee8168338c8b44d4551b55000c6ed2e)

src/librbd/AsyncObjectThrottle.cc

index 4a5ae561903ceb8398732d0fdf6dcefa4a05b873..b6dbcb261399bb4df84684c5123caa2d63eb1399 100644 (file)
@@ -93,7 +93,10 @@ void AsyncObjectThrottle<T>::start_next_op() {
       done = true;
     }
     if (m_prog_ctx != NULL) {
-      m_prog_ctx->update_progress(ono, m_end_object_no);
+      r = m_prog_ctx->update_progress(ono, m_end_object_no);
+      if (r < 0) {
+        m_ret = r;
+      }
     }
   }
 }