]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't notify_change on error when notify async complete 4387/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Fri, 17 Apr 2015 07:15:54 +0000 (15:15 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Tue, 5 May 2015 01:07:57 +0000 (09:07 +0800)
Don't need to increment the refresh_seq since the async op fails.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/librbd/ImageWatcher.cc

index a493bd518644e7335cd2634238b22dc0eb054e98..12bc5983c09500e92629d22118330d72a6ffb60a 100644 (file)
@@ -427,8 +427,10 @@ int ImageWatcher::notify_async_complete(const AsyncRequestId &request,
   bufferlist bl;
   ::encode(NotifyMessage(AsyncCompletePayload(request, r)), bl);
 
-  librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
-                       &m_image_ctx);
+  if (r >= 0) {
+    librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
+                         &m_image_ctx);
+  }
   int ret = m_image_ctx.md_ctx.notify2(m_image_ctx.header_oid, bl,
                                       NOTIFY_TIMEOUT, NULL);
   if (ret < 0) {