[cifs-protocol] [EXTERNAL] Re: Clarification on expected behavior with SMB2 short reads/writes. [120051422002815]
Jeremy Allison
jra at samba.org
Tue Jun 2 18:14:40 UTC 2020
On Tue, Jun 02, 2020 at 05:53:13PM +0000, Obaid Farooqi wrote:
>
> Hi Jeremy:
> I have filed a bug against MS-SMB2 to document the behavior of Windows for this scenario.
>
> Please let me know if it does not answer your question.
Thanks Obaid. It is also a horrible bug in the Windows client :-).
So yes, it answers the question of what the Windows
client does (lose data!) but I already knew that.
I think the Windows client has very poor behavior here.
The Linux CIFSFS kernel client and the Samba libsmbclient
libraries don't have this problem - they will re-issue
reads for the missing short data in the middle of a
read stream.
IMHO the client should only give up on reads if the
server returns an error or returns 0 (EOF) on
a read request.
The "correct" and "expected" behavior of the SMB2
protocol on short read return really needs to be
explicitly documented I think.
It's still unclear if this is expected protocol
behavior, or an actual bug in the Windows redirector.
Jeremy.
More information about the cifs-protocol
mailing list