summaryrefslogtreecommitdiff
path: root/src/os/FileStore.cc
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-05-30 11:14:26 -0700
committerSage Weil <sage@newdream.net>2012-05-30 11:14:26 -0700
commit07498d66233f388807a458554640cb77424114c0 (patch)
tree7543e6ad85b8f943d026479fe525795b7e8619ac /src/os/FileStore.cc
parent2b856ace2142876cf882427873c4246f6f9efca5 (diff)
downloadceph-07498d66233f388807a458554640cb77424114c0.tar.gz
filestore: log about syncfs(2) etc support
Fixes: #2479 Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/os/FileStore.cc')
-rw-r--r--src/os/FileStore.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index da0dea094da..7ed55dbf916 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -1471,6 +1471,25 @@ int FileStore::_detect_fs()
btrfs = false;
}
+#ifdef HAVE_SYS_SYNCFS
+ if (syncfs(fd) == 0) {
+ dout(0) << "mount syncfs(2) syscall fully supported (by glibc and kernel)" << dendl;
+ } else {
+ dout(0) << "mount syncfs(2) syscall supported by glibc BUT NOT the kernel" << dendl;
+ } else
+#endif
+ {
+ if (btrfs) {
+ dout(0) << "mount syncfs(2) syscall not support by glibc, 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;
+ } else {
+ dout(0) << "mount syncfs(2) syscall not support by glibc; 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;
}