On Sun, 5 Jan 2025 at 14:53, Takeshi Nishimura via Cygwin <cygwin@cygwin.com> wrote: > > On Sun, Jan 5, 2025 at 1:06 PM Václav Haisman via Cygwin > <cygwin@cygwin.com> wrote: > > > > On 05. 01. 25 7:31, Cedric Blancher via Cygwin wrote: > > > Good morning! > > > > > > Could Cygwin implement copy_file_range() support, including sparse > > > file support so holes are preserved, and > > > FSCTL_DUPLICATE_EXTENTS_TO_FILE support? > > > > In theory, this could be used to implement that function. In practice, > > the block cloning is only supported by ReFS. See > > <https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ni-winioctl-fsctl_duplicate_extents_to_file> > > All Windows Server (2019, 2022) installations we have. and those which > I know about, use ReFS (except in cases where Alternate Streams are > required). > AFAIK SMB3 also support FSCTL_DUPLICATE_EXTENTS_TO_FILE, so this would > be a HUGE win for Cygwin
I agree. Cygwin has notoriously bad filename lookup performance (because each open("foo.bar") also looks up "foo.bar.lnk", "foo.bar.exe", "foo.bar.exe.lnk" and so on *SERIALLY*), and I hope that implementing copy_file_range() via FSCTL_DUPLICATE_EXTENTS_TO_FILE will win back a bit of performance for copying large files. Even more so for SMB, where the filename lookup dominates the total file copying time. But if IO happens on the server side, that might compensate for it. Ced -- Cedric Blancher <cedric.blanc...@gmail.com> [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple