]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: always deregister child clone from parent with deep flatten
authorJason Dillaman <dillaman@redhat.com>
Mon, 20 Apr 2015 17:38:10 +0000 (13:38 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 7 May 2015 02:07:46 +0000 (22:07 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/AsyncFlattenRequest.cc

index 2d7497737e6dc2f80dffec65d5b54147ea1023ae..f8fbde0472ae4e015fe9409611fb48ffd3e8371d 100644 (file)
@@ -166,7 +166,8 @@ bool AsyncFlattenRequest::send_update_children() {
       // (if snapshots remain, they have their own parent info, and the child
       // will be removed when the last snap goes away)
       RWLock::RLocker l2(m_image_ctx.snap_lock);
-      if (!m_image_ctx.snaps.empty()) {
+      if ((m_image_ctx.features & RBD_FEATURE_DEEP_FLATTEN) == 0 &&
+          !m_image_ctx.snaps.empty()) {
         return true;
       }
 
@@ -180,7 +181,7 @@ bool AsyncFlattenRequest::send_update_children() {
       assert(r == 0);
       rados_completion->release();
     }
-  }  
+  }
 
   if (lost_exclusive_lock) {
     complete(-ERESTART);