]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: possible recursive reader lock during resize
authorJason Dillaman <dillaman@redhat.com>
Tue, 1 Sep 2015 00:03:38 +0000 (20:03 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 19 Nov 2015 01:34:43 +0000 (20:34 -0500)
With multiple resizes concurrently queued, it's possible for
the owner lock to be locked multiple times.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/operation/ResizeRequest.cc

index 825b5442849305fca46fae4c490c5244a7be3b6d..cb5699f5a35c7a2d6bc56483023139557e5fba16 100644 (file)
@@ -124,12 +124,12 @@ void ResizeRequest::send_op() {
 
   CephContext *cct = m_image_ctx.cct;
   if (is_canceled()) {
-    complete(-ERESTART);
+    async_complete(-ERESTART);
   } else if (m_original_size == m_new_size) {
     ldout(cct, 2) << this << " no change in size (" << m_original_size
                  << " -> " << m_new_size << ")" << dendl;
     m_state = STATE_FINISHED;
-    complete(0);
+    async_complete(0);
   } else if (m_new_size > m_original_size) {
     ldout(cct, 2) << this << " expanding image (" << m_original_size
                  << " -> " << m_new_size << ")" << dendl;