diff options
author | David Howells <dhowells@redhat.com> | 2017-08-29 10:18:56 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-08-29 10:55:20 +0100 |
commit | e833251ad813168253fef9915aaf6a8c883337b0 (patch) | |
tree | d9eae5c029cf3e3439076dc79e1aaeff16bff126 /include/net/af_rxrpc.h | |
parent | 3ec0efde582e7e86a1a853ef96468aff86090d20 (diff) | |
download | linux-e833251ad813168253fef9915aaf6a8c883337b0.tar.gz linux-e833251ad813168253fef9915aaf6a8c883337b0.tar.bz2 linux-e833251ad813168253fef9915aaf6a8c883337b0.zip |
rxrpc: Add notification of end-of-Tx phase
Add a callback to rxrpc_kernel_send_data() so that a kernel service can get
a notification that the AF_RXRPC call has transitioned out the Tx phase and
is now waiting for a reply or a final ACK.
This is called from AF_RXRPC with the call state lock held so the
notification is guaranteed to come before any reply is passed back.
Further, modify the AFS filesystem to make use of this so that we don't have
to change the afs_call state before sending the last bit of data.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/net/af_rxrpc.h')
-rw-r--r-- | include/net/af_rxrpc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h index c172709787af..07a47ee6f783 100644 --- a/include/net/af_rxrpc.h +++ b/include/net/af_rxrpc.h @@ -21,6 +21,8 @@ struct rxrpc_call; typedef void (*rxrpc_notify_rx_t)(struct sock *, struct rxrpc_call *, unsigned long); +typedef void (*rxrpc_notify_end_tx_t)(struct sock *, struct rxrpc_call *, + unsigned long); typedef void (*rxrpc_notify_new_call_t)(struct sock *, struct rxrpc_call *, unsigned long); typedef void (*rxrpc_discard_new_call_t)(struct rxrpc_call *, unsigned long); @@ -37,7 +39,8 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *, gfp_t, rxrpc_notify_rx_t); int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *, - struct msghdr *, size_t); + struct msghdr *, size_t, + rxrpc_notify_end_tx_t); int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *, void *, size_t, size_t *, bool, u32 *); bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *, |