Message ID | 1305235954-9860-2-git-send-email-jaschut@sandia.gov (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Changes since v1: If try_write() needs to re-open a connection when there is a message send in progress, just requeue it. This is more robust, since it handles all possible ways the connection could have gotten to that state. Jim Schutt (1): libceph: fix handle_timeout() racing with con_work()/try_write() net/ceph/messenger.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index db12abc..657a2de 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -1707,6 +1707,12 @@ static int try_write(struct ceph_connection *con) dout("try_write start %p state %lu nref %d\n", con, con->state, atomic_read(&con->nref)); + if (test_bit(OPENING, &con->state)) { + dout("try_write %p raced ceph_con_open, won - retry\n", con); + ret = 0; + goto out; + } + more: dout("try_write %p out_msg %p out_kvec_bytes %d\n", con, con->out_msg, con->out_kvec_bytes);