summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-05-30 15:06:07 -0700
committerSage Weil <sage@newdream.net>2012-05-30 15:06:19 -0700
commita6f8fe352e8b0f825a381d149443de8c5c78c6fe (patch)
tree9cbe979061adba10869a4ebee6f67aef6d16081e /src/os
parent188d171805037981757358618498a1006136cf1c (diff)
downloadceph-a6f8fe352e8b0f825a381d149443de8c5c78c6fe.tar.gz
filestore: fix my broken ifdef flow
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/os')
-rw-r--r--src/os/FileStore.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 7ed55dbf916..91978e4af90 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -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;
}