]> git.apps.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>
Fri, 5 Jun 2015 16:24:27 +0000 (12:24 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/AioRequest.cc

index 7339b7f93d72979d49f2dedd61f79e197440dcd9..f4701c3b6483b3e728088ae10c50d32c66387d31 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: