From: Jason Dillaman Date: Mon, 2 Feb 2015 16:20:26 +0000 (-0500) Subject: librbd: removing objects can lead to infinite loop X-Git-Tag: v0.93~120^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14424c8aabe55d299c9c8ef73908b9f77dba51ac;p=ceph.git librbd: removing objects can lead to infinite loop 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 Reviewed-by: Josh Durgin --- diff --git a/src/librbd/AioRequest.cc b/src/librbd/AioRequest.cc index 907367a192e1..c4948f81ee46 100644 --- a/src/librbd/AioRequest.cc +++ b/src/librbd/AioRequest.cc @@ -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);