浏览代码

ceph: reset msgr backoff during open, not after successful handshake

Reset the backoff delay when we reopen the connection, so that the delays
for any initial connection problems are reasonable.  We were resetting only
after a successful handshake, which was of limited utility.

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 15 年之前
父节点
当前提交
03c677e1d1
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      fs/ceph/messenger.c

+ 1 - 2
fs/ceph/messenger.c

@@ -348,6 +348,7 @@ void ceph_con_open(struct ceph_connection *con, struct ceph_entity_addr *addr)
 	set_bit(OPENING, &con->state);
 	set_bit(OPENING, &con->state);
 	clear_bit(CLOSED, &con->state);
 	clear_bit(CLOSED, &con->state);
 	memcpy(&con->peer_addr, addr, sizeof(*addr));
 	memcpy(&con->peer_addr, addr, sizeof(*addr));
+	con->delay = 0;      /* reset backoff memory */
 	queue_con(con);
 	queue_con(con);
 }
 }
 
 
@@ -1162,8 +1163,6 @@ static int process_connect(struct ceph_connection *con)
 		     con->connect_seq);
 		     con->connect_seq);
 		WARN_ON(con->connect_seq !=
 		WARN_ON(con->connect_seq !=
 			le32_to_cpu(con->in_reply.connect_seq));
 			le32_to_cpu(con->in_reply.connect_seq));
-
-		con->delay = 0;  /* reset backoff memory */
 		prepare_read_tag(con);
 		prepare_read_tag(con);
 		break;
 		break;