Skip to content

smbdirect/client/server: improved error handling and other small improvements

Stefan Metzmacher linux-cifs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18smb: smbdirect/client: introduce SMBDIRECT_SOCKET_ERRORfs/smb/client/smbdirect.c fs/smb/common/smbdirect/smbdirect_socket.h+4 -00 replies
2/18smb: smbdirect: let smbdirect_socket_init() initialize all [delayed_]work_structs as disabledfs/smb/common/smbdirect/smbdirect_socket.h+20 -00 replies
3/18smb: smbdirect: introduce smbdirect_socket.first_errorfs/smb/common/smbdirect/smbdirect_socket.h+1 -00 replies
4/18smb: client: let smbd_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...fs/smb/client/smbdirect.c+40 -00 replies
5/18smb: client: fill in smbdirect_socket.first_error on errorfs/smb/client/smbdirect.c+6 -00 replies
6/18smb: client: let smbd_disconnect_rdma_connection() disable all work but disconnect_workfs/smb/client/smbdirect.c+10 -00 replies
7/18smb: client: let smbd_{destroy,disconnect_rdma_{work,connection}}() wake up all wait queuesfs/smb/client/smbdirect.c+40 -120 replies
8/18smb: client: make consitent use of spin_lock_irq{save,restore}() in smbdirect.cfs/smb/client/smbdirect.c+15 -110 replies
9/18smb: client: allocate smbdirect workqueue at the beginning of _smbd_get_connection()fs/smb/client/smbdirect.c+14 -130 replies
10/18smb: client: defer calling ib_alloc_pd() after we are connectedfs/smb/client/smbdirect.c+11 -80 replies
11/18smb: client: let smbd_post_send_iter() call ib_dma_map_single() for the header firstfs/smb/client/smbdirect.c+21 -220 replies
12/18smb: server: let smb_direct_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...fs/smb/server/transport_rdma.c+40 -00 replies
13/18smb: server: fill in smbdirect_socket.first_error on errorfs/smb/server/transport_rdma.c+6 -00 replies
14/18smb: server: let smb_direct_disconnect_rdma_connection() disable all work but disconnect_workfs/smb/server/transport_rdma.c+9 -00 replies
15/18smb: server: let {free_transport,smb_direct_disconnect_rdma_{work,connection}}() wake up all wait queuesfs/smb/server/transport_rdma.c+34 -60 replies
16/18smb: server: make consitent use of spin_lock_irq{save,restore}() in transport_rdma.cfs/smb/server/transport_rdma.c+24 -150 replies
17/18smb: server: make use of ib_alloc_cq_any() instead of ib_alloc_cq()fs/smb/server/transport_rdma.c+7 -50 replies
18/18smb: server: let smb_direct_flush_send_list() invalidate a remote key firstfs/smb/server/transport_rdma.c+7 -40 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/18] smbdirect/client/server: improved error handling and other small improvements

Hi,

here are some patches basically on top of the other smbdirect patches, which let us use common structures, see:
https://lore.kernel.org/linux-cifs/[email protected]/

They improve the error handling in all kind of situations, we now consistently reset SMBDIRECT_SOCKET_CONNECTED on the first error and wake up all waiters to notice the state change.

We also disable all work consistently on error.

We consistently use spin_lock_irq{save,restore}() now.

There are also some improvements in order to make further refactoring easier:
- E.g. move ib_alloc_pd() and ib_dma_map_single() on the client.
- On the server use ib_alloc_cq_any()
- let smb_direct_flush_send_list() invalidate a remote key in the first message

Some of these are already in Steve's for-next-next branch. I'll soon provide a branch that can replace for-next-next, as some of these patches should be moved before some existing patches, while dropping some of the patches from for-next-next. So that we only have patches for 6.18 included, the rest will be deferred to 6.19.

Stefan Metzmacher (18):
smb: smbdirect/client: introduce SMBDIRECT_SOCKET_ERROR
smb: smbdirect: let smbdirect_socket_init() initialize all
[delayed_]work_structs as disabled
smb: smbdirect: introduce smbdirect_socket.first_error
smb: client: let smbd_disconnect_rdma_connection() set
SMBDIRECT_SOCKET_ERROR...
smb: client: fill in smbdirect_socket.first_error on error
smb: client: let smbd_disconnect_rdma_connection() disable all work
but disconnect_work
smb: client: let smbd_{destroy,disconnect_rdma_{work,connection}}()
wake up all wait queues
smb: client: make consitent use of spin_lock_irq{save,restore}() in
smbdirect.c
smb: client: allocate smbdirect workqueue at the beginning of
_smbd_get_connection()
smb: client: defer calling ib_alloc_pd() after we are connected
smb: client: let smbd_post_send_iter() call ib_dma_map_single() for
the header first
smb: server: let smb_direct_disconnect_rdma_connection() set
SMBDIRECT_SOCKET_ERROR...
smb: server: fill in smbdirect_socket.first_error on error
smb: server: let smb_direct_disconnect_rdma_connection() disable all
work but disconnect_work
smb: server: let
{free_transport,smb_direct_disconnect_rdma_{work,connection}}() wake up all wait queues
smb: server: make consitent use of spin_lock_irq{save,restore}() in
transport_rdma.c
smb: server: make use of ib_alloc_cq_any() instead of ib_alloc_cq()
smb: server: let smb_direct_flush_send_list() invalidate a remote key
first

 fs/smb/client/smbdirect.c                  | 224 +++++++++++++++------
 fs/smb/common/smbdirect/smbdirect_socket.h |  24 +++
 fs/smb/server/transport_rdma.c             | 157 ++++++++++++---
 3 files changed, 309 insertions(+), 96 deletions(-)
Signature · 1 line
2.43.0