https://bugs.winehq.org/show_bug.cgi?id=55029
Bug ID: 55029 Summary: Wishlist: do reflink on CopyFileW for WINEPREFIX size reduction Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: arthur200126@gmail.com Distribution: ---
The current implementation of CopyFileW consists of a simple read-write loop. This of course is completely fine in terms of Windows emulation, but one of the consequences is huge file size inflation when setting up things like a WINEPREFIX: on a wine 7.7-staging 64-bit install, each fresh prefix takes up 1.2 GiB: 619M of that is System32, and Syswow64 520M.
Doing reflink on the CopyFileW interface (which is what rundll32 uses to get wine.ini set up) would greatly reduce the disk space burden associated with setting up a fresh prefix. Removal of real disk IO would also make the process a lot faster. Back in GNU land, the `cp` utility has been doing reflink by default since June 2020.