[cifs-protocol] [REG:112042860618701] SMB1 -- proper client behavior when it does not hold an oplock

Obaid Farooqi obaidf at microsoft.com
Mon Apr 30 09:14:16 MDT 2012

Hi Jeff:
I'll help you with this issue and will be in touch as soon as I have an answer.

Obaid Farooqi
Escalation Engineer | Microsoft

Exceeding your expectations is my highest priority.  If you would like to provide feedback on your case you may contact my manager at nkang at Microsoft dot com

-----Original Message-----
From: Jeff Layton [mailto:jlayton at poochiereds.net] On Behalf Of Jeff Layton
Sent: Friday, April 27, 2012 1:34 PM
To: pfif at tridgell.net; cifs-protocol at samba.org; Interoperability Documentation Help
Cc: smfrench at gmail.com; crh at samba.org
Subject: SMB1 -- proper client behavior when it does not hold an oplock

Hash: SHA1

Sorry for the duplicate emails, but I sent this to the wrong dochelp
address before. Let me try again...

Hi Dochelp!

I'm hoping you can help clarify some points about proper SMB1 (and
maybe SMB2?) client behavior when it does not hold an oplock (at least
one that allows write caching).

My understanding has always been that when a client does not have an
oplock that allows write caching, then it should not cache any writes
- -- full stop. If an application does a write then the kernel should not
return until it has been sent to the server and the reply has come
back. That behavior is at least suggested in MS-CIFS, though it does
not come out and state that explicitly.

OTOH, Steve French suggested that that's not required by the protocol
and that clients are allowed to buffer up writes "briefly" in order to
allow the redirector to batch up small writes into a single request as
long as it flushes them out in a timely fashion. That seems a little
crazy to me, but I guess it's not the craziest thing in SMB1 if so...

So I guess my questions are:

1) What does the protocol actually mandate? Are you allowed to briefly
buffer up writes before returning to an application when the client
holds no oplock?

2) What does Windows actually do in this regard? If you are not allowed
to do that by the protocol, then does it follow this strictly or does it
do as Steve suggests and batch up small writes until it can fill a
write request?

Thanks for any info you can provide!
- --
Jeff Layton <jlayton at samba.org>
Version: GnuPG v2.0.18 (GNU/Linux)

Microsoft is committed to protecting your privacy.  Please read the Microsoft Privacy Statement for more information.The above is an email for a support case from Microsoft Corp.REPLY ALL TO THIS MESSAGE or INCLUDE casemail at microsoft.com IN YOUR REPLY if you want your response added to the case automatically. For technical assistance, please include the Support Engineer on the TO: line. Thank you.

More information about the cifs-protocol mailing list