[linux-cifs-client][patch] prevent data integrity problems when
socket starts returning EAGAINs
Jeff Layton
jlayton at redhat.com
Thu Oct 2 13:29:00 GMT 2008
On Sat, 27 Sep 2008 20:42:41 -0500
"Shirish Pargaonkar" <shirishpargaonkar at gmail.com> wrote:
> One more attempt. There was a bug in prior one, lenght += is incorrect.
>
> Regards,
>
> Shirish
>
Tested this patch out today. I see some warnings that ought to be
cleaned up before we take it:
fs/cifs/transport.c: In function ‘smb_send_blocking’:
fs/cifs/transport.c:267: warning: suggest explicit braces to avoid ambiguous ‘else’
fs/cifs/transport.c: In function ‘smb_send2_blocking’:
fs/cifs/transport.c:413: warning: suggest explicit braces to avoid ambiguous ‘else’
fs/cifs/transport.c: At top level:
fs/cifs/transport.c:280: warning: ‘smb_send2’ defined but not used
I'm also not sure I understand the problem you're solving here. How do
the writes get mixed up like this? It looks like after smb_send2 gives
up, it returns -EAGAIN to the caller. How does this become the data
corruption you mention?
After this patch smb_send and smb_send2 are no longer used. It might be
best to modify smb_send and smb_send2 to do what their blocking
variants do. There's no real need to bloat out the module with code that
isn't used.
Thanks,
--
Jeff Layton <jlayton at redhat.com>
More information about the linux-cifs-client
mailing list