mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 12:11:59 +02:00
smb: smbdirect: introduce smbdirect_socket.send_io.pending.{count,{dec,zero}_wait_queue}
This will be shared between client and server soon. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
de32f33c03
commit
3b7be44a0e
|
|
@ -77,6 +77,21 @@ struct smbdirect_socket {
|
|||
struct kmem_cache *cache;
|
||||
mempool_t *pool;
|
||||
} mem;
|
||||
|
||||
/*
|
||||
* The state about posted/pending sends
|
||||
*/
|
||||
struct {
|
||||
atomic_t count;
|
||||
/*
|
||||
* woken when count is decremented
|
||||
*/
|
||||
wait_queue_head_t dec_wait_queue;
|
||||
/*
|
||||
* woken when count reached zero
|
||||
*/
|
||||
wait_queue_head_t zero_wait_queue;
|
||||
} pending;
|
||||
} send_io;
|
||||
|
||||
/*
|
||||
|
|
@ -148,6 +163,10 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc)
|
|||
|
||||
init_waitqueue_head(&sc->status_wait);
|
||||
|
||||
atomic_set(&sc->send_io.pending.count, 0);
|
||||
init_waitqueue_head(&sc->send_io.pending.dec_wait_queue);
|
||||
init_waitqueue_head(&sc->send_io.pending.zero_wait_queue);
|
||||
|
||||
INIT_LIST_HEAD(&sc->recv_io.free.list);
|
||||
spin_lock_init(&sc->recv_io.free.lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user