diff mbox

osd/OSD.cc: Fix typo in OSD::heartbeat_check()

Message ID 1346996967-6380-1-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng Sept. 7, 2012, 5:49 a.m. UTC
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(-)

Comments

Sage Weil Sept. 12, 2012, 9:28 p.m. UTC | #1
Applied.  Nice catch!

Thanks-
sage


On Fri, 7 Sep 2012, Yan, Zheng wrote:

> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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