[Bug 55029] New: Wishlist: do reflink on CopyFileW for WINEPREFIX size reduction
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(a)winehq.org Reporter: arthur200126(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #1 from Jactry Zeng <jactry92(a)gmail.com> --- There were some discussions in https://www.winehq.org/pipermail/wine-devel/2022-January/205911.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #2 from Mingye Wang <arthur200126(a)gmail.com> --- Gotta say the patch is a lot more elegant than what I expected -- no big new protocol for the server, just a little IOCTL that windows already has. The discussion seems to have detailed into something about emulating reflink on ext4, which really should not have stopped the patch from going in! Welp. Should I CC Alex Xu on this? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 Shmerl <shtetldik(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |shtetldik(a)gmail.com --- Comment #3 from Shmerl <shtetldik(a)gmail.com> --- Did anything come out of this? These changes don't seem to be merged and there is no merge request opened with this feature. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 Mingye Wang <arthur200126(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex_y_xu(a)yahoo.ca --- Comment #4 from Mingye Wang <arthur200126(a)gmail.com> --- Sherml, I don't think so. Ah what the heck, let's just CC Alex Xu and see what he thinks about maybe giving the patch a new life. * * * Typo in comment 2: "detailed" should be "derailed" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #5 from Alex Xu <alex_y_xu(a)yahoo.ca> --- Created attachment 74974 --> https://bugs.winehq.org/attachment.cgi?id=74974 rebased IOCTL_COPYCHUNK patches I stopped submitting the patches due to apparent lack of interest in wine project. I have done a basic rebase which compiles successfully but haven't tested further. If wine project is interested in accepting them now, I can go through it more carefully. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #6 from Shmerl <shtetldik(a)gmail.com> --- (In reply to Alex Xu from comment #5)
Created attachment 74974 [details] rebased IOCTL_COPYCHUNK patches
I stopped submitting the patches due to apparent lack of interest in wine project. I have done a basic rebase which compiles successfully but haven't tested further. If wine project is interested in accepting them now, I can go through it more carefully.
May be you can turn it into a MR on Wine's gitlab? I think this is a pretty useful feature. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 kaan.batin.tr(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kaan.batin.tr(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 Mingye Wang <arthur200126(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.com --- Comment #7 from Mingye Wang <arthur200126(a)gmail.com> --- This wish just bumped into my eyes again via CC list change. Thanks for reminding me it exists. Since I am not Alex, I don't think I'm ready to turn this thing into an MR myself and go through all the code review process. But what I can do is, according to https://wiki.winehq.org/Wine-Staging_Contributing, CC one of the stagehands to request that it be considered for wine-staging (which gets used a lot anyways!). I see that Alistair is doing the most of the recent commits to the staging repository, so... Alistair: Please consider Alex's patches for staging. This way more people can start to test it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #8 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Currently this doesn't apply cleanly to the latest wine code, so will take sometime to get into shape. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 Alex Xu <alex_y_xu(a)yahoo.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74974|0 |1 is obsolete| | --- Comment #9 from Alex Xu <alex_y_xu(a)yahoo.ca> --- Created attachment 76668 --> https://bugs.winehq.org/attachment.cgi?id=76668 second rebased IOCTL_COPYCHUNK patches only minor configure changes and one setupapi line need to be rebased. I've checked that reflink works and can start cmd, but not gui, wow64, run test exe, etc. if there's a serious chance of it getting into wine or wine-staging, I can run some more tests. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55029 --- Comment #10 from Alex Xu <alex_y_xu(a)yahoo.ca> --- windows supports CoW in CopyFile now: https://devblogs.microsoft.com/engineering-at-microsoft/copy-on-write-in-win.... I think previously CopyFile called IOCTL_COPYCHUNK which is still only for network shares, and now also calls FSCTL_DUPLICATE_EXTENTS_TO_FILE which is only for ReFS. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla