prepare_read_connect(con);
break;
- case CEPH_MSGR_TAG_WAIT:
- /*
- * If there is a connection race (we are opening connections to
- * each other), one of us may just have to WAIT. We will keep
- * our queued messages, in expectation of being replaced by an
- * incoming connection.
- */
- dout("process_connect peer connecting WAIT\n");
- set_bit(WAIT, &con->state);
- con_close_socket(con);
- break;
-
case CEPH_MSGR_TAG_READY:
clear_bit(CONNECTING, &con->state);
if (con->in_reply.flags & CEPH_MSG_CONNECT_LOSSY)
prepare_read_tag(con);
break;
+ case CEPH_MSGR_TAG_WAIT:
+ /*
+ * If there is a connection race (we are opening
+ * connections to each other), one of us may just have
+ * to WAIT. This shouldn't happen if we are the
+ * client.
+ */
+ pr_err("process_connect peer connecting WAIT\n");
+
default:
pr_err("ceph connect protocol error, will retry\n");
con->error_msg = "protocol error, garbage tag during connect";
ret = read_partial_connect(con);
if (ret <= 0)
goto done;
- if (process_connect(con) < 0 || test_bit(WAIT, &con->state)) {
+ if (process_connect(con) < 0) {
ret = -1;
goto out;
}
*/
static void queue_con(struct ceph_connection *con)
{
- if (test_bit(WAIT, &con->state) ||
- test_bit(DEAD, &con->state)) {
- dout("queue_con %p ignoring: WAIT|DEAD\n",
+ if (test_bit(DEAD, &con->state)) {
+ dout("queue_con %p ignoring: DEAD\n",
con);
return;
}
dout("con_work OPENING\n");
con_close_socket(con);
}
- if (test_bit(WAIT, &con->state)) { /* we are a zombie */
- dout("con_work WAIT\n");
- goto done;
- }
if (test_and_clear_bit(SOCK_CLOSED, &con->state) ||
try_read(con) < 0 ||
#define STANDBY 8 /* no outgoing messages, socket closed. we keep
* the ceph_connection around to maintain shared
* state with the peer. */
-#define WAIT 9 /* waiting for peer to connect to us (during a
- * connection race) */
#define CLOSED 10 /* we've closed the connection */
#define SOCK_CLOSED 11 /* socket state changed to closed */
#define REGISTERED 12 /* connection appears in con_tree */