Skip to content

smb: client/smbdirect: connect bug fixes/cleanups and smbdirect_socket.status_wait

Stefan Metzmacher linux-cifs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 1 replyIn review
  2. v29 patches 0 repliesSuperseded
  3. v19 patches 3 repliesSuperseded

Changes in v3 from the cover letter

smbd_disconnect_rdma_work() needed to handle more than SMBDIRECT_SOCKET_CONNECTED in order to call rdma_disconnect.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9smb: client: return an error if rdma_connect does not return within 5 secondsfs/smb/client/smbdirect.c+4 -20 replies
2/9smb: client: improve logging in smbd_conn_upcall()fs/smb/client/smbdirect.c+10 -40 replies
3/9smb: client: don't call init_waitqueue_head(&info->conn_wait) twice in _smbd_get_connectionfs/smb/client/smbdirect.c+0 -10 replies
4/9smb: client: only use a single wait_queue to monitor smbdirect connection statusfs/smb/client/smbdirect.c fs/smb/client/smbdirect.h+9 -110 replies
5/9smb: client/smbdirect: replace SMBDIRECT_SOCKET_CONNECTING with more detailed statesfs/smb/client/smbdirect.c fs/smb/common/smbdirect/smbdirect_socket.h+79 -81 reply
6/9smb: client: use status_wait and SMBDIRECT_SOCKET_NEGOTIATE_RUNNING for completionfs/smb/client/smbdirect.c fs/smb/client/smbdirect.h+10 -120 replies
7/9smb: client: use status_wait and SMBDIRECT_SOCKET_RESOLVE_{ADDR,ROUTE}_RUNNING for completionfs/smb/client/smbdirect.c fs/smb/client/smbdirect.h+28 -230 replies
8/9smb: smbdirect: introduce smbdirect_socket.status_waitfs/smb/common/smbdirect/smbdirect_socket.h+1 -00 replies
9/9smb: client: make use of smbdirect_socket.status_waitfs/smb/client/smbdirect.c fs/smb/client/smbdirect.h+16 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/9] smb: client/smbdirect: connect bug fixes/cleanups and smbdirect_socket.status_wait

Hi,

this is the next step towards a common smbdirect layer between cifs.ko and ksmbd.ko, with the aim to provide a socket layer for userspace usage at the end of the road.

This patchset focuses on the client side.

The first one is a fix for very long timeouts against unreachable servers.

The others prepare the use of a single wait_queue for state changes. This removes a lot of special handling during the connect and negotiate phases.

The last two move the state_wait queue into the common smbdirect_socket.status_wait.

For the server I have only a single patch that also uses smbdirect_socket.status_wait, but I'm skipping the server patches today.

I used the following xfstests as regression tests:
cifs/001 generic/001 generic/002 generic/005 generic/006 generic/007 generic/010 generic/011

Between cifs.ko against ksmbd.ko via siw.ko.

V3:
smbd_disconnect_rdma_work() needed to handle more than SMBDIRECT_SOCKET_CONNECTED in order to call rdma_disconnect.

V2:
init_waitqueue_head(&info->status_wait); was moved to the beginning so that it is correctly initialized in smbd_create_id().

Stefan Metzmacher (9):
smb: client: return an error if rdma_connect does not return within 5
seconds
smb: client: improve logging in smbd_conn_upcall()
smb: client: don't call init_waitqueue_head(&info->conn_wait) twice in
_smbd_get_connection
smb: client: only use a single wait_queue to monitor smbdirect
connection status
smb: client/smbdirect: replace SMBDIRECT_SOCKET_CONNECTING with more
detailed states
smb: client: use status_wait and SMBDIRECT_SOCKET_NEGOTIATE_RUNNING
for completion
smb: client: use status_wait and
SMBDIRECT_SOCKET_RESOLVE_{ADDR,ROUTE}_RUNNING for completion
smb: smbdirect: introduce smbdirect_socket.status_wait
smb: client: make use of smbdirect_socket.status_wait

 fs/smb/client/smbdirect.c                  | 167 +++++++++++++++------
 fs/smb/client/smbdirect.h                  |   8 -
 fs/smb/common/smbdirect/smbdirect_socket.h |  15 +-
 3 files changed, 134 insertions(+), 56 deletions(-)
Signature · 1 line
2.43.0