cp block cloning support, by default Re: Random ideas for 3.7
Thomas Wolff
towo@towo.net
Mon Apr 14 06:27:46 GMT 2025
Am 14.04.2025 um 00:58 schrieb Takeshi Nishimura:
> On Tue, Mar 18, 2025 at 8:51 PM Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
>> Fodder for future Cygwin development:
>>
>> For a start I'd like to add some additions to POSIX-1.2025 which catched
>> my eye. Whoever wants to take a stab at some of the functionality, feel
>> free.
>>
>> I have noticed especially:
> Copying file support via cp --reflink would be good.
> This is now the default for all applications which use CopyFile(),
> CopyFileEx(), CopyFile2() in Windows Server 2025 and Windows 11, says
> https://devblogs.microsoft.com/engineering-at-microsoft/copy-on-write-in-win32-api-early-access/
>
> I did some research:
> Windows supports this for network drives (SMB) and local ReFS drives
> by default with the FSCTL_DUPLICATE_EXTENTS_TO_FILE ioctl.
> Cygwin therefore needs to implement fclonefileat() via
> FSCTL_DUPLICATE_EXTENTS_TO_FILE, make cp --reflink=always the default,
> and that's it.
--reflink=always is not suitable as a default; the manual says "If this
is not possible the copy fails"
More information about the Cygwin-developers
mailing list