From: Sage Weil Date: Wed, 17 Feb 2010 06:01:03 +0000 (-0800) Subject: ceph: allow connection to be reopened by fault callback X-Git-Tag: firefly_0821_release~9833^2~2552^2~36 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2663ab60de59d20fa33da3528f6d5359f8eb003;p=firefly-linux-kernel-4.4.55.git ceph: allow connection to be reopened by fault callback Fix the messenger to allow a ceph_con_open() during the fault callback. Previously the work wasn't getting queued on the connection because the fault path avoids requeued work (normally spurious). Loop on reopening by checking for the OPENING state bit. This fixes OSD reconnects when a TCP connection drops. Signed-off-by: Sage Weil --- diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 44bdaf439924..acf383f6a9cd 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -1808,7 +1808,7 @@ done: clear_bit(BUSY, &con->state); dout("con->state=%lu\n", con->state); if (test_bit(QUEUED, &con->state)) { - if (!backoff) { + if (!backoff || test_bit(OPENING, &con->state)) { dout("con_work %p QUEUED reset, looping\n", con); goto more; }