]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
AsyncConnection: Clean up unused variables
authorHaomai Wang <haomaiwang@gmail.com>
Wed, 11 Feb 2015 14:40:51 +0000 (22:40 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Wed, 11 Feb 2015 14:40:51 +0000 (22:40 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncConnection.h

index cfef223e03b5f41584593205bedd0037a5743306..aed8c10ed6919d6d2b02c0791d4aa18294a5187a 100644 (file)
@@ -179,8 +179,7 @@ AsyncConnection::AsyncConnection(CephContext *cct, AsyncMessenger *m, EventCente
     out_seq(0), in_seq(0), in_seq_acked(0), state(STATE_NONE), state_after_send(0), sd(-1),
     port(-1), lock("AsyncConnection::lock"), open_write(false), keepalive(false), recv_buf(NULL),
     recv_max_prefetch(MIN(msgr->cct->_conf->ms_tcp_prefetch_max_size, TCP_PREFETCH_MIN_SIZE)),
-    recv_start(0), recv_end(0), stop_lock("AsyncConnection::stop_lock"),
-    got_bad_auth(false), authorizer(NULL), replacing(false),
+    recv_start(0), recv_end(0), got_bad_auth(false), authorizer(NULL), replacing(false),
     is_reset_from_peer(false), once_ready(false), state_buffer(NULL), state_offset(0), net(cct), center(c)
 {
   read_handler.reset(new C_handle_read(this));
@@ -2023,12 +2022,12 @@ void AsyncConnection::fault()
   replacing = false;
   outcoming_bl.clear();
   if (!once_ready && !is_queued() &&
-    state >=STATE_ACCEPTING && state <= STATE_ACCEPTING_WAIT_CONNECT_MSG_AUTH) {
-  ldout(async_msgr->cct, 0) << __func__ << " with nothing to send and in the half "
-                            << "accept state just closed, state="
-                            << get_state_name(state) << dendl;
-   _stop();
-   return ;
+      state >=STATE_ACCEPTING && state <= STATE_ACCEPTING_WAIT_CONNECT_MSG_AUTH) {
+    ldout(async_msgr->cct, 0) << __func__ << " with nothing to send and in the half "
+                              << "accept state just closed, state="
+                              << get_state_name(state) << dendl;
+    _stop();
+    return ;
   }
   if (policy.standby && !is_queued()) {
     ldout(async_msgr->cct,0) << __func__ << " with nothing to send, going to standby" << dendl;
index d511b8e8a3ac0e9fb99bc56bd8d21b8dc9bcea52..da2aad1e4f4fd77f77e2fe1679df469b98428670 100644 (file)
@@ -225,11 +225,7 @@ class AsyncConnection : public Connection {
   EventCallbackRef reset_handler;
   EventCallbackRef remote_reset_handler;
   EventCallbackRef connect_handler;
-  EventCallbackRef fast_connect_handler;
   EventCallbackRef accept_handler;
-  EventCallbackRef fast_accept_handler;
-  EventCallbackRef stop_handler;
-  EventCallbackRef signal_handler;
   EventCallbackRef local_deliver_handler;
   bool keepalive;
   struct iovec msgvec[IOV_MAX];
@@ -237,8 +233,6 @@ class AsyncConnection : public Connection {
   uint32_t recv_max_prefetch;
   uint32_t recv_start;
   uint32_t recv_end;
-  Mutex stop_lock; // used to protect `mark_down_cond`
-  Cond stop_cond;
   set<uint64_t> register_time_events; // need to delete it if stop
 
   // Tis section are temp variables used by state transition
@@ -265,7 +259,6 @@ class AsyncConnection : public Connection {
                      // there won't exists conflicting connection so we use
                      // "replacing" to skip RESETSESSION to avoid detect wrong
                      // presentation
-  bool allow_session_reset;
   bool is_reset_from_peer;
   bool once_ready;
   atomic_t stopping;