summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2015-06-08 12:08:33 -0700
committerJ. Bruce Fields <bfields@redhat.com>2015-08-10 16:05:43 -0400
commit598e2359090d393b01a8e10386dc3056ccfa47ae (patch)
treeba60a2163a0ef727a0223f6b4f5c95e38aeec720 /include/linux/sunrpc/svc.h
parentb9e13cdfac70e38ade17b53810a36968c5842339 (diff)
nfsd/sunrpc: abstract out svc_set_num_threads to sv_ops
Add an operation that will do setup of the service. In the case of a classic thread-based service that means starting up threads. In the case of a workqueue-based service, the setup will do something different. Signed-off-by: Shirley Ma <shirley.ma@oracle.com> Acked-by: Jeff Layton <jlayton@primarydata.com> Tested-by: Shirley Ma <shirliey.ma@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 97609d0f68f6..fd5bb9922545 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -61,6 +61,9 @@ struct svc_serv_ops {
/* queue up a transport for servicing */
void (*svo_enqueue_xprt)(struct svc_xprt *);
+ /* set up thread (or whatever) execution context */
+ int (*svo_setup)(struct svc_serv *, struct svc_pool *, int);
+
/* optional module to count when adding threads (pooled svcs only) */
struct module *svo_module;
};