SUNRPC: Add a helper to allow pNFS drivers to selectively cancel RPC calls
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 5 Oct 2022 19:57:36 +0000 (15:57 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 6 Oct 2022 13:52:09 +0000 (09:52 -0400)
commitf8423909ecca208834a9d704e58409800f8b5f21
treea55dc54d7ad0254bcab9d25240cc64b249483e61
parent39494194f93bed7926d4b3bd03a6a76ba23e612b
SUNRPC: Add a helper to allow pNFS drivers to selectively cancel RPC calls

Add the helper rpc_cancel_tasks(), which uses a caller-defined selection
function to define a set of in-flight RPC calls to cancel. This is
mainly intended for pNFS drivers which are subject to a layout recall,
and which may therefore want to cancel all pending I/O using that layout
in order to redrive it after the layout recall has been satisfied.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/sched.h
net/sunrpc/clnt.c
net/sunrpc/sched.c