RFR: 8293122: (fs) Use file cloning in macOS version of Files::copy method [v2]
Alan Bateman
alanb at openjdk.org
Fri Sep 9 07:25:41 UTC 2022
On Wed, 7 Sep 2022 00:51:40 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8293122: Revert BsdFileStore; move volume capability check to BsdNativeDispatcher
>
> src/java.base/macosx/classes/sun/nio/fs/BsdFileSystem.java line 110:
>
>> 108: switch (x.errno()) {
>> 109: case ENOTSUP: // cloning not supported by filesystem
>> 110: return IOStatus.UNSUPPORTED;
>
> It might be that `ENOTSUP` should instead result in `UNSUPPORTED_CASE` and that the static variable `cloneFileNotSupported` is unnecessary.
Yes, ENOTSUP depends on the parameters to I think it maps to UNSUPPORTED_CASE. Given that it has to handle ENOTSUP then it may be that the check for the VOL_CAP_INT_CLONE feature isn't needed. You may have to compare to the performance of getattrlist to see if it helps when the file systems don't support clone.
-------------
PR: https://git.openjdk.org/jdk/pull/10188
More information about the nio-dev
mailing list