RFR: 8232861: (fc) FileChannel.force fails on WebDAV file systems (macOS) [v2]

Alan Bateman alanb at openjdk.java.net
Thu Apr 8 07:33:15 UTC 2021


On Wed, 7 Apr 2021 20:35:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> I am going to try to test this.
>
> I was unable to get `ENOTSUP` from local FAT32 or NTFS devices. However from the review discussion [1] of [2] it looks like `ENOTSUP` has been observed and is handled in other packages [3]. Is there any harm to leaving it in?
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8080589
> [2] http://mail.openjdk.java.net/pipermail/nio-dev/2015-May/003160.html
> [3] https://community.oracle.com/tech/developers/discussion/453477/patch-when-fnctl-fd-f-fullsync-0-returns-enotsup

The force method needs  fcntl(F_FULLSYNC) when the file system is local so I think it would be safer to drop the special handle for ENOTSUP. This will mean fallback to fsync when the file is not local.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3366


More information about the nio-dev mailing list