]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: don't set object map to nonexistent during image sync
authorJason Dillaman <dillaman@redhat.com>
Wed, 4 May 2016 03:15:58 +0000 (23:15 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 10 May 2016 17:43:57 +0000 (13:43 -0400)
The object maps are initialized to nonexistent at snapshot creation,
so this operation is unnecessary.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit fe5d4a811f9d9d1160ff7104fe9243cc17ef1bef)

src/test/rbd_mirror/image_sync/test_mock_ObjectCopyRequest.cc
src/tools/rbd_mirror/image_sync/ObjectCopyRequest.cc

index d99d7dfae1b05a02c39bf55d8f1115fd8921d701..69c4c646465245b09a905609813893d3f91557a8 100644 (file)
@@ -537,8 +537,6 @@ TEST_F(TestMockImageSyncObjectCopyRequest, Remove) {
   expect_remove(mock_local_io_ctx, 0);
   expect_update_object_map(mock_local_image_ctx, mock_object_map,
                            m_local_snap_ids[0], OBJECT_EXISTS, 0);
-  expect_update_object_map(mock_local_image_ctx, mock_object_map,
-                           m_local_snap_ids[1], OBJECT_NONEXISTENT, 0);
 
   request->send();
   ASSERT_EQ(0, ctx.wait());
index 7cf12923df5a8f9fbdc0645594f490f6a6003d1e..23497bab1cb7df793502941b51edce873bf4d01e 100644 (file)
@@ -333,7 +333,6 @@ void ObjectCopyRequest<I>::compute_diffs() {
                                                     end_size, 0U, bufferlist());
       }
     } else {
-      m_snap_object_states[end_snap_id] = OBJECT_NONEXISTENT;
       if (prev_exists) {
         // object remove
         ldout(cct, 20) << ": remove op" << dendl;