All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: ceph-devel@vger.kernel.org
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH] osd/OSD.cc: Fix typo in OSD::heartbeat_check()
Date: Fri,  7 Sep 2012 13:49:27 +0800	[thread overview]
Message-ID: <1346996967-6380-1-git-send-email-zheng.z.yan@intel.com> (raw)

From: "Yan, Zheng" <zheng.z.yan@intel.com>

The check 'p->second.last_tx > cutoff' should always be false
since last_tx is periodically updated by OSD::heartbeat()

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 src/osd/OSD.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 5add675..562fd25 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -1946,13 +1946,13 @@ void OSD::heartbeat_check()
        p != heartbeat_peers.end();
        p++) {
     dout(25) << "heartbeat_check osd." << p->first
-	     << " first_rx " << p->second.first_tx
+	     << " first_tx " << p->second.first_tx
 	     << " last_tx " << p->second.last_tx
 	     << " last_rx " << p->second.last_rx
 	     << dendl;
     if (p->second.last_rx == utime_t()) {
       if (p->second.last_tx == utime_t() ||
-	  p->second.last_tx > cutoff)
+	  p->second.first_tx > cutoff)
 	continue;  // just started sending recently
       derr << "heartbeat_check: no reply from osd." << p->first
 	   << " ever, first ping sent " << p->second.first_tx
-- 
1.7.11.4


             reply	other threads:[~2012-09-07  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07  5:49 Yan, Zheng [this message]
2012-09-12 21:28 ` [PATCH] osd/OSD.cc: Fix typo in OSD::heartbeat_check() Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346996967-6380-1-git-send-email-zheng.z.yan@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.