Skip to content

Commit

Permalink
rbd-mirror: use generalized copy deep for image sync
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
  • Loading branch information
Mykola Golub committed Aug 29, 2017
1 parent e595c5b commit ec00195
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 314 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ struct ImageSync<librbd::MockTestImageCtx> {
static ImageSync* create(
librbd::MockTestImageCtx *local_image_ctx,
librbd::MockTestImageCtx *remote_image_ctx,
SafeTimer *timer, Mutex *timer_lock, const std::string &mirror_uuid,
::journal::MockJournaler *journaler,
const std::string &mirror_uuid, ::journal::MockJournaler *journaler,
librbd::journal::MirrorPeerClientMeta *client_meta, ContextWQ *work_queue,
InstanceWatcher<librbd::MockTestImageCtx> *instance_watcher,
Context *on_finish, ProgressContext *progress_ctx) {
Expand Down
3 changes: 1 addition & 2 deletions src/test/rbd_mirror/test_ImageSync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class TestImageSync : public TestFixture {

ImageSync<> *create_request(Context *ctx) {
return new ImageSync<>(m_local_image_ctx, m_remote_image_ctx,
m_threads->timer, &m_threads->timer_lock,
"mirror-uuid", m_remote_journaler, &m_client_meta,
m_threads->work_queue, m_instance_watcher, ctx);
}
Expand All @@ -120,7 +119,7 @@ TEST_F(TestImageSync, Empty) {
ASSERT_EQ(0, m_remote_image_ctx->state->refresh());
ASSERT_EQ(0U, m_remote_image_ctx->snap_ids.size());
ASSERT_EQ(0, m_local_image_ctx->state->refresh());
ASSERT_EQ(1U, m_local_image_ctx->snap_ids.size()); // deleted on journal replay
ASSERT_EQ(0U, m_local_image_ctx->snap_ids.size());
}

TEST_F(TestImageSync, Simple) {
Expand Down

0 comments on commit ec00195

Please sign in to comment.