RFR: 8232861: (fc) FileChannel.force fails on WebDAV file systems (macOS)
Brian Burkhalter
bpb at openjdk.java.net
Wed Apr 7 02:41:56 UTC 2021
Apparently `fcntl(fd, F_FULLFSYNC)` can fail with `ENOTTY` in addition to `ENOTSUP` although it is not so documented. The `ioctl()` case is documented as
[ENOTTY] fildes is not associated with a character special
device.
[ENOTTY] The specified request does not apply to the kind of
object that the descriptor fildes references.
This request proposes to catch `ENOTTY` as well and fall back to `fsync(fd)`. The change was verified manually using a WebDAV server and no failures in CI test tiers 1-3 were observed. An alternative would be to fall back to `fsync(fd)` for **all** errors.
-------------
Commit messages:
- 8232861: (fc) FileChannel.force fails on WebDAV file systems (macOS)
Changes: https://git.openjdk.java.net/jdk/pull/3366/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3366&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8232861
Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/3366.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3366/head:pull/3366
PR: https://git.openjdk.java.net/jdk/pull/3366
More information about the nio-dev
mailing list