[cifs-protocol] FSCTL_DUPLICATE_EXTENTS_TO_FILE questions, 116092214702946
jeffm at microsoft.com
Thu Sep 22 15:51:41 UTC 2016
Thank you Nathan! [Nathan to BCC]
I would like to look into these questions. Could you send net traces for the two scenarios (sparse vs. non-sparse) you describe?
I created a DTM Workspace for uploading files to this case. You will receive a separate email from "CTS Automated Diagnostics Services" with access information. Please note that the email will ask you to change your password the first time you log in, so it's important to preserve the password you set.
Jeff McCashland | Senior Escalation Engineer | Microsoft Protocol Open Specifications Team
Phone: +1 (425) 703-8300 x38300 | Hours: 9am-5pm | Time zone: (UTC-08:00) Pacific Time (US and Canada)
Local country phone number found here: http://support.microsoft.com/globalenglish | Extension 1138300
We value your feedback. My manager is Rama Ganesan (ramagane), +1 (425) 703-8712
From: Nathan Manis
Sent: Thursday, September 22, 2016 4:31 AM
To: David Disseldorp <ddiss at suse.de>
Cc: cifs-protocol at lists.samba.org; MSSolve Case Email <casemail at microsoft.com>
Subject: RE: FSCTL_DUPLICATE_EXTENTS_TO_FILE questions, 116092214702946
[Dochelp to bcc]
Thank you for your question. We have created a service request to review the report below and assist further. The service request number is 116092214702946. An engineer from the Protocols team will contact you soon.
From: David Disseldorp [mailto:ddiss at suse.de]
Sent: Thursday, September 22, 2016 2:57 AM
To: Interoperability Documentation Help
Cc: cifs-protocol at lists.samba.org
Subject: FSCTL_DUPLICATE_EXTENTS_TO_FILE questions
I've been testing FSCTL_DUPLICATE_EXTENTS_TO_FILE functionality against a Windows Server 2016 server, and have noticed the following behaviour which appears contrary to the [MS-FSCC] spec:
2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE Reply ...
Error Code == STATUS_NOT_SUPPORTED
a) Target file is sparse, while source is a non-sparse file.
b) The source range is beyond the source file's allocation size.
The destination range extends beyond the target file's allocation size.
The caller might need to increase the target's allocation size before
(a) appears to be reversed, in that STATUS_NOT_SUPPORTED is returned if the source is sparse, while the target is non-sparse. However, if target is sparse while the source is non-sparse, then FSCTL_DUPLICATE_EXTENTS_TO_FILE completes successfully.
(b) appears incorrect - issuing a FSCTL_DUPLICATE_EXTENTS_TO_FILE request where the destination range extends beyond the target's allocation/file size (zero) results in a successful response. However, the file size remains zero in this case.
One final query - are there any lock conditions where FSCTL_DUPLICATE_EXTENTS_TO_FILE will return STATUS_FILE_LOCK_CONFLICT?
As is, FSCTL_DUPLICATE_EXTENTS_TO_FILE appears to completely bypass file locks.
More information about the cifs-protocol