[linux-cifs-client][patch] prevent data integrity problems when socket starts returning EAGAINs

Shirish Pargaonkar shirishpargaonkar at gmail.com
Thu Sep 25 19:07:26 GMT 2008


With the write size of 56K or even with smaller write sizes, under
duress, writing
over sockets can result in data corruption when socket returns EAGAIN during
sendmsg and cifs attempts to write 14 times over 15 seconds and gives up.

The data between threads can get mixed up and many times the initial message
of one request does get sent as a later part of another request
resulting in some
requests not reaching the a SMB server, server thus not responding to those
requests and cifs timing out during response and reconnecting.

Change the socket from non-blocking to blocking with a timeout of 15 seconds,
which is same as cifs trying to send a messages over non-blocking socket
upto 15 seconds for large requests such as 56K Write Andx.


Regards,

Shirish S. Pargaonkar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smbsend3.patch
Type: application/octet-stream
Size: 3546 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20080925/b0d3f608/smbsend3.obj


More information about the linux-cifs-client mailing list