]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Bluestore: Only use F_SET_FILE_RW_HINT when available 26431/head
authorWillem Jan Withagen <wjw@digiware.nl>
Thu, 14 Feb 2019 16:54:38 +0000 (17:54 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 14 Feb 2019 16:54:38 +0000 (17:54 +0100)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/os/bluestore/KernelDevice.cc

index df75086f43daa13f95d895fa30f42efc670cadc5..4f2aaa3373fe4dc7ee8a838446a8c6a52b6d2752 100644 (file)
@@ -92,6 +92,7 @@ int KernelDevice::open(const string& p)
     goto out_fail;
   }
 
+#if defined(F_SET_FILE_RW_HINT)
   for (i = WRITE_LIFE_NONE; i < WRITE_LIFE_MAX; i++) {
     if (fcntl(fd_directs[i], F_SET_FILE_RW_HINT, &i) < 0) {
       r = -errno;
@@ -106,6 +107,7 @@ int KernelDevice::open(const string& p)
     enable_wrt = false;
     dout(0) << "ioctl(F_SET_FILE_RW_HINT) on " << path << " failed: " << cpp_strerror(r) << dendl;
   }
+#endif
 
   dio = true;
   aio = cct->_conf->bdev_aio;