s3/locking: add fetch_share_mode_send/recv
The boolean out parameter "queued" tells the caller whether the
async request is blocked in a full send queue:
false := request is dispatched
true := send queue is full, request waiting to be dispatched
This is useful in a clustered Samba environment where the async dbwrap
request is sent over a socket to the local ctdbd.
If the send queue is full and the caller was issuing multiple async
dbwrap requests in a loop, the caller knows it's probably time to stop
sending requests for now and try again later.
This will be used in subsequent commits in
smbd_smb2_query_directory_send() when implementing async write time
updates. Directories may contain umpteen files so we send many requests
to ctdb without going through tevent and reading the responses which
has the potential to deadlock.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>