From: Jason Dillaman Date: Mon, 20 Apr 2015 17:38:10 +0000 (-0400) Subject: librbd: always deregister child clone from parent with deep flatten X-Git-Tag: v9.0.2~225^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc66b7849aecf24c2fc1e9221fbc8c7f35d901e2;p=ceph.git librbd: always deregister child clone from parent with deep flatten Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/AsyncFlattenRequest.cc b/src/librbd/AsyncFlattenRequest.cc index 2d7497737e6d..f8fbde0472ae 100644 --- a/src/librbd/AsyncFlattenRequest.cc +++ b/src/librbd/AsyncFlattenRequest.cc @@ -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);