librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "local image id", {},
+ "local image id",
nullptr, &remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "local image id", {},
+ "local image id",
nullptr, &remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "", {}, nullptr,
+ "", nullptr,
&remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "", {}, nullptr,
+ "", nullptr,
&remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "", {}, nullptr,
+ "", nullptr,
&remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "local image id", {},
+ "local image id",
nullptr, &remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
librbd::journal::MirrorPeerClientMeta client_meta;
C_SaferCond ctx;
auto req = MockPrepareRemoteImageRequest::create(&mock_threads,
+ m_local_io_ctx,
m_remote_io_ctx,
"global image id",
"local mirror uuid",
- "local image id", {},
+ "local image id",
nullptr, &remote_mirror_uuid,
&remote_image_id,
&remote_journaler,
dout(10) << dendl;
update_progress("PREPARE_REMOTE_IMAGE");
- auto cct = static_cast<CephContext *>(m_local_io_ctx.cct());
- ::journal::Settings journal_settings;
- journal_settings.commit_interval = cct->_conf.get_val<double>(
- "rbd_mirror_journal_commit_age");
-
ceph_assert(*m_remote_journaler == nullptr);
Context *ctx = create_context_callback<
BootstrapRequest, &BootstrapRequest<I>::handle_prepare_remote_image>(this);
auto req = image_replayer::PrepareRemoteImageRequest<I>::create(
- m_threads, m_remote_io_ctx, m_global_image_id, m_local_mirror_uuid,
- *m_local_image_id, journal_settings, m_cache_manager_handler,
+ m_threads, m_local_io_ctx, m_remote_io_ctx, m_global_image_id,
+ m_local_mirror_uuid, *m_local_image_id, m_cache_manager_handler,
m_remote_mirror_uuid, m_remote_image_id, m_remote_journaler,
&m_client_state, &m_client_meta, ctx);
req->send();
#include <string>
namespace journal { class Journaler; }
-namespace journal { class Settings; }
namespace journal { struct CacheManagerHandler; }
namespace librbd { struct ImageCtx; }
namespace librbd { namespace journal { struct MirrorPeerClientMeta; } }
typedef librbd::journal::MirrorPeerClientMeta MirrorPeerClientMeta;
static PrepareRemoteImageRequest *create(Threads<ImageCtxT> *threads,
+ librados::IoCtx &local_io_ctx,
librados::IoCtx &remote_io_ctx,
const std::string &global_image_id,
const std::string &local_mirror_uuid,
const std::string &local_image_id,
- const ::journal::Settings &settings,
::journal::CacheManagerHandler *cache_manager_handler,
std::string *remote_mirror_uuid,
std::string *remote_image_id,
cls::journal::ClientState *client_state,
MirrorPeerClientMeta *client_meta,
Context *on_finish) {
- return new PrepareRemoteImageRequest(threads, remote_io_ctx,
+ return new PrepareRemoteImageRequest(threads, local_io_ctx, remote_io_ctx,
global_image_id, local_mirror_uuid,
- local_image_id, settings,
- cache_manager_handler,
- remote_mirror_uuid,
- remote_image_id, remote_journaler,
- client_state, client_meta, on_finish);
+ local_image_id, cache_manager_handler,
+ remote_mirror_uuid, remote_image_id,
+ remote_journaler, client_state,
+ client_meta, on_finish);
}
PrepareRemoteImageRequest(Threads<ImageCtxT> *threads,
+ librados::IoCtx &local_io_ctx,
librados::IoCtx &remote_io_ctx,
const std::string &global_image_id,
const std::string &local_mirror_uuid,
const std::string &local_image_id,
- const ::journal::Settings &journal_settings,
::journal::CacheManagerHandler *cache_manager_handler,
std::string *remote_mirror_uuid,
std::string *remote_image_id,
cls::journal::ClientState *client_state,
MirrorPeerClientMeta *client_meta,
Context *on_finish)
- : m_threads(threads), m_remote_io_ctx(remote_io_ctx),
+ : m_threads(threads),
+ m_local_io_ctx(local_io_ctx),
+ m_remote_io_ctx(remote_io_ctx),
m_global_image_id(global_image_id),
m_local_mirror_uuid(local_mirror_uuid), m_local_image_id(local_image_id),
- m_journal_settings(journal_settings),
m_cache_manager_handler(cache_manager_handler),
m_remote_mirror_uuid(remote_mirror_uuid),
m_remote_image_id(remote_image_id),
*/
Threads<ImageCtxT> *m_threads;
+ librados::IoCtx &m_local_io_ctx;
librados::IoCtx &m_remote_io_ctx;
std::string m_global_image_id;
std::string m_local_mirror_uuid;
std::string m_local_image_id;
- ::journal::Settings m_journal_settings;
::journal::CacheManagerHandler *m_cache_manager_handler;
std::string *m_remote_mirror_uuid;
std::string *m_remote_image_id;