msys2-runtime icon indicating copy to clipboard operation
msys2-runtime copied to clipboard

Need copy_file_range() which uses FSCTL_DUPLICATE_EXTENTS_TO_FILE

Open aureliencouderc opened this issue 4 months ago • 10 comments

MSYS2 file copy is EXTREMELY slow for big files on REFS on Windows 11.

Since Win10 is soon End-of-support MSYS2 more and more people use REFS, and there MSYS2 is slow. It turns out that cmd.exe and powershell.exe cheat a bit when copying files on REFS: They do not copy data, they clone blocks via FSCTL_DUPLICATE_EXTENTS_TO_FILE.

coreutils cp and mv could do the same IF MSYS2 would implement copy_file_range() backed by FSCTL_DUPLICATE_EXTENTS_TO_FILE.

aureliencouderc avatar Aug 18 '25 15:08 aureliencouderc