smb: smbdirect: introduce smbdirect_socket.connect.{lock,work}
This will first be used by the server in order to defer the processing of the initial recv of the negotiation request. But in future it will also be used by the client in order to implement an async connect. Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>master
parent
8f0b4cce44
commit
49ca214774
|
|
@ -132,6 +132,14 @@ struct smbdirect_socket {
|
|||
|
||||
struct smbdirect_socket_parameters parameters;
|
||||
|
||||
/*
|
||||
* The state for connect/negotiation
|
||||
*/
|
||||
struct {
|
||||
spinlock_t lock;
|
||||
struct work_struct work;
|
||||
} connect;
|
||||
|
||||
/*
|
||||
* The state for keepalive and timeout handling
|
||||
*/
|
||||
|
|
@ -353,6 +361,10 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc)
|
|||
INIT_WORK(&sc->disconnect_work, __smbdirect_socket_disabled_work);
|
||||
disable_work_sync(&sc->disconnect_work);
|
||||
|
||||
spin_lock_init(&sc->connect.lock);
|
||||
INIT_WORK(&sc->connect.work, __smbdirect_socket_disabled_work);
|
||||
disable_work_sync(&sc->connect.work);
|
||||
|
||||
INIT_WORK(&sc->idle.immediate_work, __smbdirect_socket_disabled_work);
|
||||
disable_work_sync(&sc->idle.immediate_work);
|
||||
INIT_DELAYED_WORK(&sc->idle.timer_work, __smbdirect_socket_disabled_work);
|
||||
|
|
|
|||
Loading…
Reference in New Issue