RFR: 8264744: (fs) Use file cloning in Linux and macOS versions of FileChannel transfer and Files copy methods [v2]

Markus KARG duke at openjdk.org
Fri Jul 15 11:33:09 UTC 2022


On Fri, 15 Jul 2022 02:30:00 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Add file cloning to `java.nio.channels.FileChannel::transferTo` and `java.nio.file.Files.copy(Path,Path)`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8264744: Refactor into provider+dispatcher to reduce amount of JNI code

I really appreciate all I/O performance improvements, in particular offloading to OS and FS! :-)

test/jdk/java/nio/file/Files/CopyAndMove.java line 52:

> 50:     // for testing cloning / reflink on Linux
> 51:     private static final Set<String> COW_TYPES =
> 52:         Set.of("bcachefs", "btrfs", "ocfs2", "xfs");

Shouldn't we also test on non-CoW-FS to be sure that the recent changes do not have a negative impact *there*?

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

Marked as reviewed by mkarg at github.com (no known OpenJDK username).

PR: https://git.openjdk.org/jdk/pull/9486


More information about the nio-dev mailing list