mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
rbd-mirror: spawn replayer thread
Also, wait for it to finish only if it has been started. Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
ed035a3bf3
commit
803eb511dc
@ -37,7 +37,9 @@ Replayer::~Replayer()
|
||||
Mutex::Locker l(m_lock);
|
||||
m_cond.Signal();
|
||||
}
|
||||
m_replayer_thread.join();
|
||||
if (m_replayer_thread.is_started()) {
|
||||
m_replayer_thread.join();
|
||||
}
|
||||
}
|
||||
|
||||
int Replayer::init()
|
||||
@ -81,6 +83,8 @@ int Replayer::init()
|
||||
m_pool_watcher.reset(new PoolWatcher(m_remote, 30, m_lock, m_cond));
|
||||
m_pool_watcher->refresh_images();
|
||||
|
||||
m_replayer_thread.create("replayer");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user