[9] RFR of 8080589: (fs) FileChannel.force should use fcntl(F_FULLFSYNC) instead of fsync on OS X

Robert Muir rcmuir at gmail.com
Tue May 19 02:14:47 UTC 2015


On Mon, May 18, 2015 at 9:24 PM, Brian Burkhalter
<brian.burkhalter at oracle.com> wrote:
>
> +#ifdef MACOSX
> +    result = fcntl(fd, F_FULLFSYNC);
> +#else

According to fcntl(2) on OS X, this may not be implemented for all filesystems.

Should code handle failure/ENOTSUP as suggested here?
https://community.oracle.com/thread/453477
I see similar code in other open-source databases (but typically not
checking errno for anything specific).


More information about the nio-dev mailing list