]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: remove: keep ictx open until snapshots are scanned
authorDan Mick <dan.mick@inktank.com>
Tue, 14 Aug 2012 18:44:03 +0000 (11:44 -0700)
committerDan Mick <dan.mick@inktank.com>
Sat, 18 Aug 2012 01:31:51 +0000 (18:31 -0700)
src/librbd/internal.cc

index b732cb08452bf84064a2050c588960c4e1f6e8ae..55b61440e1856fed228836959273cf96aaac6fbd 100644 (file)
@@ -992,7 +992,6 @@ namespace librbd {
       // struct assignment
       cls_client::parent_info parent_info = ictx->parent_md;
       ictx->parent_lock.Unlock();
-      close_image(ictx);
 
       // scan snapshots; if none of them refer to this parent,
       // remove the child from parent's list
@@ -1012,6 +1011,7 @@ namespace librbd {
          }
        }
       }
+      close_image(ictx);
 
       ldout(cct, 2) << "removing header..." << dendl;
       r = io_ctx.remove(header_oid);