Hi Slow, Apologies for the delayed response on this question. I've been researching the code on this issue and should have findings soon.
Thank you for your patience. Regards, Kristian Smith Support Escalation Engineer | Microsoft® Corporation Email: [email protected] -----Original Message----- From: Obaid Farooqi <[email protected]> Sent: Thursday, February 27, 2025 9:47 AM To: Ralph Boehme <[email protected]> Cc: [email protected]; Microsoft Support <[email protected]> Subject: MS-SMB2: write-through and unbuffered IO - TrackingID#2502270040011252 Hi Ralph: Thanks for contacting Microsoft. I have created a case to track this issue. A member of the open specifications team will be in touch soon. Regards, Obaid Farooqi Escalation Engineer | Microsoft -----Original Message----- From: Ralph Boehme <[email protected]> Sent: Thursday, February 27, 2025 8:42 AM To: Interoperability Documentation Help <[email protected]> Cc: [email protected] Subject: [EXTERNAL] MS-SMB2: write-through and unbuffered IO Hello dochelp, I'm doing some research on the expected server behaviour wrt to write-through and unbuffered IO, driven by working on the Persistent Handles implementation in Samba. As per MS-SMB2 the protocol offers knobs to request these 1) at open time, and 2) per write For 1) there are FILE_WRITE_THROUGH FILE_NO_INTERMEDIATE_BUFFERING and for 2) there are SMB2_WRITEFLAG_WRITE_THROUGH SMB2_WRITEFLAG_WRITE_UNBUFFERED The protocol documentation (also when read together with MS-FSA and MS-CIFS) seems to be a bit vague wrt to dependencies between per-open behaviour and per-write behaviour. ---8<--- 3.3.5.13 "Receiving an SMB2 WRITE Request" If Connection.Dialect is "3.0.2" or "3.1.1", SMB2_WRITEFLAG_WRITE_THROUGH is set in the Flags field of the request, SMB2_WRITEFLAG_WRITE_UNBUFFERED is not set in the Flags field of the request, and Open.CreateOptions doesn't include the FILE_NO_INTERMEDIATE_BUFFERING bit, the server MUST fail the request with STATUS_INVALID_PARAMETER. If Connection.Dialect is "2.1" or "3.0", SMB2_WRITEFLAG_WRITE_THROUGH is set in the Flags field of the request, and Open.CreateOptions doesn't include the FILE_NO_INTERMEDIATE_BUFFERING bit, the server MUST fail the request with STATUS_INVALID_PARAMETER. ---8<--- If my reading of the above paragraph is correct, it is not possible to to request per-write write-through IO without requesting unbuffered IO on the handle. Is this true? Am I missing something? Can you please clarify? Thanks! -slow _______________________________________________ cifs-protocol mailing list [email protected] https://lists.samba.org/mailman/listinfo/cifs-protocol
