From: YankunLi Date: Mon, 10 Jul 2017 08:39:58 +0000 (+0800) Subject: BlueStore:Failure retry for opening file X-Git-Tag: v12.1.1~90^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc660009af7da7a1179def9597dc1ad8910243b3;p=ceph.git BlueStore:Failure retry for opening file Failure retry to open file Signed-off-by: Yankun Li --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7c9933c0213ff..f69a39d6a9f7a 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3926,7 +3926,7 @@ int BlueStore::get_block_device_fsid(CephContext* cct, const string& path, int BlueStore::_open_path() { assert(path_fd < 0); - path_fd = ::open(path.c_str(), O_DIRECTORY); + path_fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_DIRECTORY)); if (path_fd < 0) { int r = -errno; derr << __func__ << " unable to open " << path << ": " << cpp_strerror(r) @@ -3954,7 +3954,7 @@ int BlueStore::_write_bdev_label(string path, bluestore_bdev_label_t label) z.zero(); bl.append(std::move(z)); - int fd = ::open(path.c_str(), O_WRONLY); + int fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_WRONLY)); if (fd < 0) { fd = -errno; derr << __func__ << " failed to open " << path << ": " << cpp_strerror(fd) @@ -3974,7 +3974,7 @@ int BlueStore::_read_bdev_label(CephContext* cct, string path, bluestore_bdev_label_t *label) { dout(10) << __func__ << dendl; - int fd = ::open(path.c_str(), O_RDONLY); + int fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_RDONLY)); if (fd < 0) { fd = -errno; derr << __func__ << " failed to open " << path << ": " << cpp_strerror(fd)