]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
wbthrottle: use feature check for fdatasync 919/head
authorNoah Watkins <noahwatkins@gmail.com>
Sun, 29 Sep 2013 18:32:29 +0000 (11:32 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sat, 7 Dec 2013 18:37:00 +0000 (10:37 -0800)
commit539fe26109e92f4c91e5d132a2afec61cdb6d246
tree3fc7b7fa1eb2e0768a0498adff471c4a1151d715
parente94ca0bd9cf3bc38a1c0acdac6e9ed4aa53dc9c3
wbthrottle: use feature check for fdatasync

Checking for fdatasync uses the same approach as the qemu configure
script. The relevant commit is d1722a27f552a22561104210e0afad4577878e53.
Here is a copy of the commit message which explains the check:

Under Darwin, a symbol exists for the fdatasync() function, so that our
link test succeeds. However _POSIX_SYNCHRONIZED_IO is set to '-1'.

According to POSIX:2008, a value of -1 means the feature is not
supported.
A value of 0 means supported at compilation time, and a value greater 0
means supported at both compilation and run time.

Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '>0'.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
configure.ac
src/os/WBThrottle.cc