From fda4d54cdab3ce15ac66819d8441f5cf65916852 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Thu, 20 Oct 2016 17:58:46 +0200 Subject: [PATCH] AsyncConnection: rename _send_keepalive_or_ack -> _append_keepalive_or_ack 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 --- src/msg/async/AsyncConnection.cc | 9 ++++----- src/msg/async/AsyncConnection.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 0afdbe66d38f2..e0b089b140500 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -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; } diff --git a/src/msg/async/AsyncConnection.h b/src/msg/async/AsyncConnection.h index 0a16752df870a..6be3707d094be 100644 --- a/src/msg/async/AsyncConnection.h +++ b/src/msg/async/AsyncConnection.h @@ -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, -- 2.39.5