summaryrefslogtreecommitdiff
path: root/scripts/diffconfig
diff options
context:
space:
mode:
authorTim Menninger <tmenninger@everpuredata.com>2026-11-06 23:28:42 +0000
committerAnna Schumaker <anna.schumaker@hammerspace.com>2026-11-10 15:43:05 -0500
commit9d84719d34cb98a2f584e38679f95216c1a15d0e (patch)
treeeb696b63ea4d36c348ab182da3bcdc7296254156 /scripts/diffconfig
parent9e28836b480c66cca4c3d391177f5b3a50927f7d (diff)
SUNRPC: add request-scoped disconnects when cancelling tasks
rpc_cancel_tasks() allows callers to cancel a selected set of RPC tasks, but callers that also need to tear down the connection currently have to disconnect at the rpc_clnt level. That is broader than necessary for clients with multiple transports. A cancelled request is associated with a specific rpc_xprt and records the connection generation on which it was transmitted in rq_connect_cookie. Add rpc_cancel_tasks_and_disconnect() to cancel matching tasks and mark matching requests that remain on the transport transmit or receive queues for conditional transport disconnect when the request is released. Store the disconnect indication in struct rpc_rqst rather than struct rpc_task. An RPC task can release one request and later acquire another, so task-scoped state could otherwise be consumed by a successor request and disconnect the wrong transport generation. After cancelling matching tasks, walk the client's transports and mark matching requests belonging to that client that remain on the transmit or receive queues. An rpc_xprt may be shared by multiple rpc_clnt instances, so requests belonging to other clients are not marked. When a marked request is released, consume the marker under the existing transport_lock critical section. If the request was transmitted, call xprt_conditional_disconnect_locked() with its rq_connect_cookie. The disconnect is skipped if that cookie no longer matches the transport's current connection generation. This adds no lock acquisition to the normal request-release path. Requests that were never transmitted do not trigger this additional disconnect. Signed-off-by: Tim Menninger <tmenninger@everpuredata.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
Diffstat (limited to 'scripts/diffconfig')
0 files changed, 0 insertions, 0 deletions