diff options
author | Sage Weil <sage@inktank.com> | 2013-06-17 13:32:07 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-24 16:20:35 -0700 |
commit | 8612e50fd70bfceebd6c291e6cab10d9dfd39e8c (patch) | |
tree | fa91ccd47ee53817a05924f9a2fa35b1522f1db0 | |
parent | 8aafe131acadc22cb069f3d98bba6922ab09c749 (diff) | |
download | ceph-8612e50fd70bfceebd6c291e6cab10d9dfd39e8c.tar.gz |
msgr: clear con->pipe inside pipe_lock on mark_down
We need to do this under protection of the pipe_lock.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit afafb87e8402242d3897069f4b94ba46ffe0c413)
-rw-r--r-- | src/msg/SimpleMessenger.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index dd6b1bd944b..04b364c3ded 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -578,6 +578,11 @@ void SimpleMessenger::mark_down(const entity_addr_t& addr) p->unregister_pipe(); p->pipe_lock.Lock(); p->stop(); + if (p->connection_state) { + // do not generate a reset event for the caller in this case, + // since they asked for it. + p->connection_state->clear_pipe(p); + } p->pipe_lock.Unlock(); } else { ldout(cct,1) << "mark_down " << addr << " -- pipe dne" << dendl; @@ -597,6 +602,11 @@ void SimpleMessenger::mark_down(Connection *con) p->unregister_pipe(); p->pipe_lock.Lock(); p->stop(); + if (p->connection_state) { + // do not generate a reset event for the caller in this case, + // since they asked for it. + p->connection_state->clear_pipe(p); + } p->pipe_lock.Unlock(); p->put(); } else { |