]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: fix unhandle error cases during block file setup
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 12 Jan 2016 02:41:28 +0000 (10:41 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 14 Jan 2016 06:30:03 +0000 (14:30 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index dd828e54415f5045646690cb5d9af67a9a5faff1..29ed6a45ec7ecd2b98ddc36225e2cf4bfb3250de 100644 (file)
@@ -1554,7 +1554,11 @@ int BlueStore::_setup_block_symlink_or_file(
       dout(1) << __func__ << " created " << name << " file with size "
              << pretty_si_t(size) << "B" << dendl;
       VOID_TEMP_FAILURE_RETRY(::close(fd));
-    }
+    } else if (r < 0) {
+      derr << __func__ << " failed to stat " << name << " file: "
+           << cpp_strerror(r) << dendl;
+      return r;
+    } 
   }
   return 0;
 }