[PATCH v2 2/3] libceph: introduce con_fault_raise() and switch to it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In preparation for connect timeout abstract ceph_connection
fault-initiating logic into a separate function and start using it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@xxxxxxxxxxx>
---
 net/ceph/messenger.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 2ed1304d22a7..c7e0143d24f1 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -378,6 +378,14 @@ static void con_sock_state_closed(struct ceph_connection *con)
 	     CON_SOCK_STATE_CLOSED);
 }
 
+
+static void con_fault_raise(struct ceph_connection *con)
+{
+	con_flag_set(con, CON_FLAG_SOCK_CLOSED);
+	queue_con(con);
+}
+
+
 /*
  * socket callback functions
  */
@@ -434,8 +442,7 @@ static void ceph_sock_state_change(struct sock *sk)
 	case TCP_CLOSE_WAIT:
 		dout("%s TCP_CLOSE_WAIT\n", __func__);
 		con_sock_state_closing(con);
-		con_flag_set(con, CON_FLAG_SOCK_CLOSED);
-		queue_con(con);
+		con_fault_raise(con);
 		break;
 	case TCP_ESTABLISHED:
 		dout("%s TCP_ESTABLISHED\n", __func__);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux