Skip to content

Commit

Permalink
Merge pull request ceph#4395 from ceph/wip-11381
Browse files Browse the repository at this point in the history
Fix clear_pipe after reaping progress

Reviewed-by: Sage Weil <[email protected]>
Reviewed-by: Greg Farnum <[email protected]>
  • Loading branch information
gregsfortytwo committed Apr 24, 2015
2 parents 4df9c8e + 0ea0e01 commit 927105b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/msg/simple/Pipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,11 @@ void Pipe::fault(bool onread)
if (policy.lossy && state != STATE_CONNECTING) {
ldout(msgr->cct,10) << "fault on lossy channel, failing" << dendl;

// disconnect from Connection, and mark it failed. future messages
// will be dropped.
assert(connection_state);
stop();
bool cleared = connection_state->clear_pipe(this);

// crib locks, blech. note that Pipe is now STATE_CLOSED and the
// rank_pipe entry is ignored by others.
Expand All @@ -1372,11 +1376,7 @@ void Pipe::fault(bool onread)
delay_thread->discard();
in_q->discard_queue(conn_id);
discard_out_queue();

// disconnect from Connection, and mark it failed. future messages
// will be dropped.
assert(connection_state);
if (connection_state->clear_pipe(this))
if (cleared)
msgr->dispatch_queue.queue_reset(connection_state.get());
return;
}
Expand Down

0 comments on commit 927105b

Please sign in to comment.