]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: permit watch flush to return error code
authorJason Dillaman <dillaman@redhat.com>
Wed, 9 Mar 2016 18:55:29 +0000 (13:55 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 9 Mar 2016 18:55:29 +0000 (13:55 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/image/CloseRequest.cc

index fa75e9426204acf937ff047175493fd039e8bbbd..55e25ab37648d222207ca110462392895b1e853f 100644 (file)
@@ -244,9 +244,12 @@ void CloseRequest<I>::send_flush_image_watcher() {
 template <typename I>
 void CloseRequest<I>::handle_flush_image_watcher(int r) {
   CephContext *cct = m_image_ctx->cct;
-  ldout(cct, 10) << this << " " << __func__ << dendl;
+  ldout(cct, 10) << this << " " << __func__ << ": r=" << r << dendl;
 
-  assert(r == 0);
+  if (r < 0) {
+    lderr(cct) << "error flushing image watcher: " << cpp_strerror(r) << dendl;
+  }
+  save_result(r);
   finish();
 }