]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: avoid infinite loop if copyup fails
authorJason Dillaman <dillaman@redhat.com>
Thu, 21 May 2015 04:13:31 +0000 (00:13 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 28 Jul 2015 20:36:35 +0000 (16:36 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 43e0e3cd63f0067217ed0811d73f6c546f3027be)

src/librbd/AioRequest.cc

index b6c4a7f265f2d894b564fb19f6c075a7cf83ceba..7dbec4a61606a87ed1c64dbf329c179ce3e9fc1c 100644 (file)
@@ -355,12 +355,13 @@ namespace librbd {
 
     case LIBRBD_AIO_WRITE_COPYUP:
       ldout(m_ictx->cct, 20) << "WRITE_COPYUP" << dendl;
-      m_state = LIBRBD_AIO_WRITE_GUARD;
       if (r < 0) {
-       return should_complete(r);
+        m_state = LIBRBD_AIO_WRITE_ERROR;
+        complete(r);
+        finished = false;
+      } else {
+        finished = send_post();
       }
-
-      finished = send_post();
       break;
 
     case LIBRBD_AIO_WRITE_FLAT: