]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #20004 from mogeb/steady-clock-tools-rados
authorKefu Chai <tchaikov@gmail.com>
Mon, 22 Oct 2018 09:46:44 +0000 (17:46 +0800)
committerGitHub <noreply@github.com>
Mon, 22 Oct 2018 09:46:44 +0000 (17:46 +0800)
librados: use steady clock for rados_mon_op_timeout

Reviewed-by: Kefu Chai <kchai@redhat.com>
1  2 
src/librados/RadosClient.cc
src/librados/RadosClient.h

index 3245892cd11c6949e47ec849253ad7a410dc6220,f08883760eb19f0655d6846702b1fef91c34f48f..cac911e23eb965eb2ba91f3fd85e30a7946514e6
@@@ -579,11 -583,12 +579,12 @@@ int librados::RadosClient::wait_for_osd
      });
  
    if (need_map) {
 -    Mutex::Locker l(lock);
 +    std::lock_guard l(lock);
  
-     utime_t timeout;
-     if (cct->_conf->rados_mon_op_timeout > 0)
-       timeout.set_from_double(cct->_conf->rados_mon_op_timeout);
+     ceph::timespan timeout;
+     if (cct->_conf->rados_mon_op_timeout > 0) {
+       timeout = ceph::make_timespan(cct->_conf->rados_mon_op_timeout);
+     }
  
      if (objecter->with_osdmap(std::mem_fn(&OSDMap::get_epoch)) == 0) {
        ldout(cct, 10) << __func__ << " waiting" << dendl;
Simple merge