Thanks for the patch. We're currently in code freeze, so I'm afraid new features won't be accepted right now, but I'll offer some review regardless: * First of all, is there an application that actually needs this? Or is this another attempt to address prefix size? This approach has more or less been rejected by Alexandre. If there's no application that specifically needs this, I don't think we want to spend effort on it. * Public definitions should be added to our headers. FSCTL_DUPLICATE_EXTENTS_TO_FILE already exists, so you shouldn't need to redefine it, and DUPLICATE_EXTENTS_DATA should be added to winioctl.h as it is in Microsoft's headers. * Please avoid forward-declaring where not necessary. * If there is an application that needs this, it needs tests. ``` +static NTSTATUS unix_fsctl_duplicate_extents_to_file( HANDLE dst_handle, const void *in_buf, ULONG in_len ) ``` "duplicate_extents_to_file" would be a better name; no need for that prefix. ``` + const DUPLICATE_EXTENTS_DATA *dx = in_buf; ``` "data" would be a better name. ``` + status = server_get_unix_fd( dst_handle, 0, &dst_fd, &needs_close_dst, NULL, &options ); + if (status) return status; + status = server_get_unix_fd( dx->FileHandle, 0, &src_fd, &needs_close_src, NULL, &options ); + if (status) goto done; ``` Should we really be passing 0 access mask here? "options" isn't used, so you could just pass NULL. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9732#note_125245