mirror of
https://github.com/ceph/ceph
synced 2025-02-01 07:52:57 +00:00
rbd-mirror: stop external replayer before closing remote journaler
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
5aa6eb2782
commit
88bd300208
@ -1157,6 +1157,16 @@ void ImageReplayer<I>::shut_down(int r, Context *on_start) {
|
||||
request->send();
|
||||
});
|
||||
}
|
||||
if (m_remote_journaler != nullptr) {
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
delete m_remote_journaler;
|
||||
m_remote_journaler = nullptr;
|
||||
ctx->complete(0);
|
||||
});
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
m_remote_journaler->shut_down(ctx);
|
||||
});
|
||||
}
|
||||
if (m_local_replay != nullptr) {
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
if (r < 0) {
|
||||
@ -1170,16 +1180,6 @@ void ImageReplayer<I>::shut_down(int r, Context *on_start) {
|
||||
m_local_replay->shut_down(true, ctx);
|
||||
});
|
||||
}
|
||||
if (m_remote_journaler != nullptr) {
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
delete m_remote_journaler;
|
||||
m_remote_journaler = nullptr;
|
||||
ctx->complete(0);
|
||||
});
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
m_remote_journaler->shut_down(ctx);
|
||||
});
|
||||
}
|
||||
if (m_replay_handler != nullptr) {
|
||||
ctx = new FunctionContext([this, ctx](int r) {
|
||||
delete m_replay_handler;
|
||||
|
Loading…
Reference in New Issue
Block a user