Commit 5963c3d0 authored by Ilya Dryomov's avatar Ilya Dryomov

libceph: rename reset_connection() to ceph_con_reset_session()

With just session reset bits left, rename appropriately.
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 3596f4c1
...@@ -651,11 +651,9 @@ static void ceph_msg_remove_list(struct list_head *head) ...@@ -651,11 +651,9 @@ static void ceph_msg_remove_list(struct list_head *head)
} }
} }
static void reset_connection(struct ceph_connection *con) static void ceph_con_reset_session(struct ceph_connection *con)
{ {
/* reset connection, out_queue, msg_ and connect_seq */ dout("%s con %p\n", __func__, con);
/* discard existing out_queue and msg_seq */
dout("reset_connection %p\n", con);
WARN_ON(con->in_msg); WARN_ON(con->in_msg);
WARN_ON(con->out_msg); WARN_ON(con->out_msg);
...@@ -683,7 +681,7 @@ void ceph_con_close(struct ceph_connection *con) ...@@ -683,7 +681,7 @@ void ceph_con_close(struct ceph_connection *con)
con_flag_clear(con, CON_FLAG_BACKOFF); con_flag_clear(con, CON_FLAG_BACKOFF);
ceph_con_reset_protocol(con); ceph_con_reset_protocol(con);
reset_connection(con); ceph_con_reset_session(con);
con->peer_global_seq = 0; con->peer_global_seq = 0;
cancel_con(con); cancel_con(con);
mutex_unlock(&con->mutex); mutex_unlock(&con->mutex);
...@@ -2140,7 +2138,7 @@ static int process_connect(struct ceph_connection *con) ...@@ -2140,7 +2138,7 @@ static int process_connect(struct ceph_connection *con)
pr_err("%s%lld %s connection reset\n", pr_err("%s%lld %s connection reset\n",
ENTITY_NAME(con->peer_name), ENTITY_NAME(con->peer_name),
ceph_pr_addr(&con->peer_addr)); ceph_pr_addr(&con->peer_addr));
reset_connection(con); ceph_con_reset_session(con);
con_out_kvec_reset(con); con_out_kvec_reset(con);
ret = prepare_write_connect(con); ret = prepare_write_connect(con);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment