From: Jason Dillaman Date: Fri, 8 May 2015 14:30:22 +0000 (-0400) Subject: librbd: object map clean state valid only for fast-diff X-Git-Tag: v9.0.2~207^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee54e71d0934805514c7737f5ca82bfaa24fed3f;p=ceph.git librbd: object map clean state valid only for fast-diff The deep-flatten feature bit is incorrectly used to determine whether to set the object map to clean. It should use the fast-diff feature bit. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/CopyupRequest.cc b/src/librbd/CopyupRequest.cc index a63a59bc94bc..8851b4c4a150 100644 --- a/src/librbd/CopyupRequest.cc +++ b/src/librbd/CopyupRequest.cc @@ -50,7 +50,7 @@ public: } uint8_t state = OBJECT_EXISTS; - if (m_image_ctx.test_features(RBD_FEATURE_DEEP_FLATTEN) && + if (m_image_ctx.test_features(RBD_FEATURE_FAST_DIFF) && m_snap_id_idx + 1 < m_snap_ids.size()) { state = OBJECT_EXISTS_CLEAN; } diff --git a/src/test/librbd/test_internal.cc b/src/test/librbd/test_internal.cc index bac02049ede1..6a80009cd9f1 100644 --- a/src/test/librbd/test_internal.cc +++ b/src/test/librbd/test_internal.cc @@ -482,7 +482,7 @@ TEST_F(TestInternal, SnapshotCopyup) // verify the object map was properly updated if ((ictx2->features & RBD_FEATURE_OBJECT_MAP) != 0) { uint8_t state = OBJECT_EXISTS; - if ((ictx2->features & RBD_FEATURE_DEEP_FLATTEN) != 0 && + if ((ictx2->features & RBD_FEATURE_FAST_DIFF) != 0 && it != snaps.begin() && snap_name != NULL) { state = OBJECT_EXISTS_CLEAN; }