]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix my broken ifdef flow
authorSage Weil <sage@newdream.net>
Wed, 30 May 2012 22:06:07 +0000 (15:06 -0700)
committerSage Weil <sage@newdream.net>
Wed, 30 May 2012 22:06:19 +0000 (15:06 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/os/FileStore.cc

index 7ed55dbf9160281079a0a1892bd618b5b70a4250..91978e4af90e1bd86cec69091506ba233c840dbb 100644 (file)
@@ -1471,25 +1471,28 @@ int FileStore::_detect_fs()
     btrfs = false;
   }
 
+  bool have_syncfs = false;
 #ifdef HAVE_SYS_SYNCFS
   if (syncfs(fd) == 0) {
     dout(0) << "mount syncfs(2) syscall fully supported (by glibc and kernel)" << dendl;
+    have_syncfs = true;
   } else {
     dout(0) << "mount syncfs(2) syscall supported by glibc BUT NOT the kernel" << dendl;
-  } else
+  }
+#else
+  dout(0) << "mount syncfs(2) syscall not support by glibc" << dendl;
 #endif
-  {
+  if (!have_syncfs) {
     if (btrfs) {
-      dout(0) << "mount syncfs(2) syscall not support by glibc, but the btrfs SYNC ioctl will suffice" << dendl;
+      dout(0) << "mount no syncfs(2), but the btrfs SYNC ioctl will suffice" << dendl;
     } else if (m_filestore_fsync_flushes_journal_data) {
-      dout(0) << "mount syncfs(2) syscall not support by glibc, but 'filestore fsync flushes journal data = true', so fsync will suffice." << dendl;
+      dout(0) << "mount no syncfs(2), but 'filestore fsync flushes journal data = true', so fsync will suffice." << dendl;
     } else {
-      dout(0) << "mount syncfs(2) syscall not support by glibc; must use sync(2)." << dendl;
+      dout(0) << "mount no syncfs(2), must use sync(2)." << dendl;
       dout(0) << "mount WARNING: multiple ceph-osd daemons on the same host will be slow" << dendl;
     }
   }
 
-
   TEMP_FAILURE_RETRY(::close(fd));
   return 0;
 }