]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
AsyncConnection: rename _send_keepalive_or_ack -> _append_keepalive_or_ack
authorIlya Dryomov <idryomov@gmail.com>
Thu, 20 Oct 2016 15:58:46 +0000 (17:58 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 7 Nov 2016 16:00:48 +0000 (17:00 +0100)
Commit 48d929c4f056 ("msg: async: improve _send_keepalive_or_ack()
a little") removed _try_send() call.  _try_send(false) was a no-op by
then, but still - rename appropriately.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncConnection.h

index 0afdbe66d38f2ff175ca531de3c027de9aa3b310..e0b089b1405004c6d8c046accd263d9eb4e783db 100644 (file)
@@ -378,7 +378,7 @@ void AsyncConnection::process()
           t = (ceph_timespec*)state_buffer;
           utime_t kp_t = utime_t(*t);
           write_lock.lock();
-          _send_keepalive_or_ack(true, &kp_t);
+          _append_keepalive_or_ack(true, &kp_t);
          write_lock.unlock();
           ldout(async_msgr->cct, 20) << __func__ << " got KEEPALIVE2 " << kp_t << dendl;
          set_last_keepalive(ceph_clock_now(NULL));
@@ -2365,8 +2365,9 @@ void AsyncConnection::mark_down()
   _stop();
 }
 
-void AsyncConnection::_send_keepalive_or_ack(bool ack, utime_t *tp)
+void AsyncConnection::_append_keepalive_or_ack(bool ack, utime_t *tp)
 {
+  ldout(async_msgr->cct, 10) << __func__ << dendl;
   if (ack) {
     assert(tp);
     struct ceph_timespec ts;
@@ -2382,8 +2383,6 @@ void AsyncConnection::_send_keepalive_or_ack(bool ack, utime_t *tp)
   } else {
     outcoming_bl.append(CEPH_MSGR_TAG_KEEPALIVE);
   }
-
-  ldout(async_msgr->cct, 10) << __func__ << " try send keepalive or ack" << dendl;
 }
 
 void AsyncConnection::handle_write()
@@ -2394,7 +2393,7 @@ void AsyncConnection::handle_write()
   write_lock.lock();
   if (can_write == WriteStatus::CANWRITE) {
     if (keepalive) {
-      _send_keepalive_or_ack();
+      _append_keepalive_or_ack();
       keepalive = false;
     }
 
index 0a16752df870a7668e49a1f2ba7c3972b34f0efc..6be3707d094beecdfbf4f9453b9999747862a291 100644 (file)
@@ -73,7 +73,7 @@ class AsyncConnection : public Connection {
   void requeue_sent();
   int randomize_out_seq();
   void handle_ack(uint64_t seq);
-  void _send_keepalive_or_ack(bool ack=false, utime_t *t=NULL);
+  void _append_keepalive_or_ack(bool ack=false, utime_t *t=NULL);
   ssize_t write_message(Message *m, bufferlist& bl, bool more);
   void inject_delay();
   ssize_t _reply_accept(char tag, ceph_msg_connect &connect, ceph_msg_connect_reply &reply,