]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: removing objects can lead to infinite loop
authorJason Dillaman <dillaman@redhat.com>
Mon, 2 Feb 2015 16:20:26 +0000 (11:20 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 3 Feb 2015 09:25:01 +0000 (10:25 +0100)
The AioRemove state machine is not properly advanced from
_PRE to _FLAT.  This will result in an infinite state machine
loop.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
src/librbd/AioRequest.cc

index 907367a192e1d366067683d98b65ad7f81a32710..c4948f81ee461aae06bd72bdec2037d97799c191 100644 (file)
@@ -259,8 +259,6 @@ namespace librbd {
       m_state = LIBRBD_AIO_WRITE_GUARD;
       m_write.assert_exists();
       ldout(m_ictx->cct, 20) << __func__ << " guarding write" << dendl;
-    } else {
-      m_state = LIBRBD_AIO_WRITE_FLAT;
     }
   }
 
@@ -480,6 +478,7 @@ namespace librbd {
     ldout(m_ictx->cct, 20) << "send_write " << this << " " << m_oid << " "
                           << m_object_off << "~" << m_object_len << dendl;
 
+    m_state = LIBRBD_AIO_WRITE_FLAT;
     guard_write();
     add_write_ops(&m_write);
     assert(m_write.size() != 0);