]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/filestore/LFNIndex.cc
import ceph 12.2.12
[ceph.git] / ceph / src / os / filestore / LFNIndex.cc
index 2befe38d5dd59791ecdf5c4f179103bb6de3d1c6..bbdb76e30cbc1e46b295856675df7f922883c0eb 100644 (file)
@@ -29,6 +29,7 @@
 #include "common/debug.h"
 #include "include/buffer.h"
 #include "common/ceph_crypto.h"
+#include "common/errno.h"
 #include "include/compat.h"
 #include "chain_xattr.h"
 
@@ -176,10 +177,11 @@ int LFNIndex::fsync_dir(const vector<string> &path)
   maybe_inject_failure();
   int r = ::fsync(fd);
   maybe_inject_failure();
-  if (r < 0)
-    return -errno;
-  else
-    return 0;
+  if (r < 0) {
+    derr << __func__ << " fsync failed: " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+  return 0;
 }
 
 int LFNIndex::link_object(const vector<string> &from,