mbox series

[0/3] more reconnect fixes

Message ID 1551829917-48772-1-git-send-email-pshilov@microsoft.com (mailing list archive)
Headers show
Series more reconnect fixes | expand

Message

Pavel Shilovsky March 5, 2019, 11:51 p.m. UTC
The patchset has 3 patches that fix some problems related to network reconnects.

The first patch fixes out-of-order requests sent over newly established TCP connections, in particular it prevents sending anything rather than SMB2_NEGOTIATE.

The second patch changes the return code from -ENOTSOCK to -EAGAIN for TCP connections that are in the middle of reconnect.

The third patch is a new version of the patch posted previously. Since we are doing socket sends in the same thread with a syscall we might experience interrupts due to signals. If such signals come while we are in the middle of sending SMB packet to the server, we may end up with partial sends and unnecessary network reconnects thus overloading the server. The patch masks off signals during the whole packet send thus avoiding interrupts and reconnects.

Pavel Shilovsky (3):
  CIFS: Only send SMB2_NEGOTIATE command on new TCP connections
  CIFS: Return -EAGAIN instead of -ENOTSOCK
  CIFS: Mask off signals when sending SMB packets

 fs/cifs/smb2transport.c |  8 ++++++++
 fs/cifs/transport.c     | 44 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 48 insertions(+), 4 deletions(-)