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

Shirish Pargaonkar shirishpargaonkar at gmail.com
Fri Oct 3 13:39:34 GMT 2008


On Thu, Oct 2, 2008 at 8:29 AM, Jeff Layton <jlayton at redhat.com> wrote:
> 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>
>

This is the version of the patch sans warnings.
I think there were will be at least one more version of this, needs some more
work, but that would be additional change besides this.

Regards,

Shirish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smbsend3.5.patch
Type: application/octet-stream
Size: 6883 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20081003/48f0f1cd/smbsend3.5.obj


More information about the linux-cifs-client mailing list