summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lang <sam.lang@inktank.com>2012-12-12 14:28:12 -1000
committerSam Lang <sam.lang@inktank.com>2012-12-12 15:17:48 -1000
commit4605fddcf66258ec65a0d937143812b98246ff46 (patch)
tree55b97b3ee03c2d728deaea5d1a30629116a4ef42
parent5f55b38827e9dec04604722785abcad7e39c1187 (diff)
downloadceph-4605fddcf66258ec65a0d937143812b98246ff46.tar.gz
filestore: Don't keep checking for syncfs if found
Valgrind outputs a warning for unrecognized system calls, and does so for the syscall(__SYS_syncfs,...) and syscall(__NR_syncfs, ...) calls. This patch avoids making those calls (and the warning, when run in valgrind) if the syncfs libc call is available. INFO:teuthology.task.ceph.osd.1.err:--10568-- WARNING: unhandled syscall: 306 INFO:teuthology.task.ceph.osd.1.err:--10568-- You may be able to write your own handler. INFO:teuthology.task.ceph.osd.1.err:--10568-- Read the file README_MISSING_SYSCALL_OR_IOCTL. INFO:teuthology.task.ceph.osd.1.err:--10568-- Nevertheless we consider this a bug. Please report INFO:teuthology.task.ceph.osd.1.err:--10568-- it at http://valgrind.org/support/bug_reports.html. Signed-off-by: Sam Lang <sam.lang@inktank.com>
-rw-r--r--src/os/FileStore.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 8cb8720738e..99cea7f22da 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -1227,16 +1227,14 @@ int FileStore::_detect_fs()
} else {
dout(0) << "mount syncfs(2) syscall supported by glibc BUT NOT the kernel" << dendl;
}
-#endif
-#ifdef SYS_syncfs
+#elif defined(SYS_syncfs)
if (syscall(SYS_syncfs, fd) == 0) {
dout(0) << "mount syscall(SYS_syncfs, fd) fully supported" << dendl;
have_syncfs = true;
} else {
dout(0) << "mount syscall(SYS_syncfs, fd) supported by libc BUT NOT the kernel" << dendl;
}
-#endif
-#ifdef __NR_syncfs
+#elif defined(__NR_syncfs)
if (syscall(__NR_syncfs, fd) == 0) {
dout(0) << "mount syscall(__NR_syncfs, fd) fully supported" << dendl;
have_syncfs = true;