]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fast abort if underlying call to statfs failed
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 20 Jun 2016 02:17:15 +0000 (10:17 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 20 Jun 2016 02:41:43 +0000 (10:41 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/client/Client.cc

index a6d5d383ab2266a2b2dafcefeab593d041e8970b..20ef94e5150b88314fe5f6705a286df81a25b4e8 100644 (file)
@@ -8882,6 +8882,13 @@ int Client::statfs(const char *path, struct statvfs *stbuf)
   int rval = cond.wait();
   client_lock.Lock();
 
+  if (rval < 0) {
+    ldout(cct, 1) << "underlying call to statfs returned error: "
+                  << cpp_strerror(rval)
+                  << dendl;
+    return rval;
+  }
+
   memset(stbuf, 0, sizeof(*stbuf));
 
   /*