ceph/ceph — pull request #3029 by guangyy (2014-11-28 08:58:23+00:00)
Title: Fix #10080 - OSD crashes during msgr reconnection

Event flow analysis:
Let us say OSD A and B are peers with each other, at certain point, B is marked down by monitor (and thus kicked off osd map), but the daemon is still there, A would mark the connection with B down and clean everything. When B is in again, it will try to connect with A and negotiate the message in/out sequence. At A side, it will receive B's in_seq and drop messages whose sequence is equal to or less than B's in_seq. In this case, A's out_seq might be inconsistent to B's in_seq.

Solution:
At A side, after receiving B's in_seq, if after locally clean-up, if its out_seq is still less than B's in_seq, bump up its out_seq to make two sides consistent with each other.

Fixes: #10080

Signed-off-by: Guang Yang