hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/sunrpc/svc.h
....@@ -109,7 +109,7 @@
109109 spinlock_t sv_cb_lock; /* protects the svc_cb_list */
110110 wait_queue_head_t sv_cb_waitq; /* sleep here if there are no
111111 * entries in the svc_cb_list */
112
- struct svc_xprt *sv_bc_xprt; /* callback on fore channel */
112
+ bool sv_bc_enabled; /* service uses backchannel */
113113 #endif /* CONFIG_SUNRPC_BACKCHANNEL */
114114 };
115115
....@@ -254,6 +254,7 @@
254254 struct page * *rq_page_end; /* one past the last page */
255255
256256 struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */
257
+ struct bio_vec rq_bvec[RPCSVC_MAXPAGES];
257258
258259 __be32 rq_xid; /* transmission id */
259260 u32 rq_prog; /* program number */
....@@ -299,6 +300,7 @@
299300 struct net *rq_bc_net; /* pointer to backchannel's
300301 * net namespace
301302 */
303
+ void ** rq_lease_breaker; /* The v4 client breaking a lease */
302304 };
303305
304306 #define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
....@@ -380,7 +382,17 @@
380382 struct cache_deferred_req handle;
381383 size_t xprt_hlen;
382384 int argslen;
383
- __be32 args[0];
385
+ __be32 args[];
386
+};
387
+
388
+struct svc_process_info {
389
+ union {
390
+ int (*dispatch)(struct svc_rqst *, __be32 *);
391
+ struct {
392
+ unsigned int lovers;
393
+ unsigned int hivers;
394
+ } mismatch;
395
+ };
384396 };
385397
386398 /*
....@@ -397,6 +409,14 @@
397409 char * pg_class; /* class name: services sharing authentication */
398410 struct svc_stat * pg_stats; /* rpc statistics */
399411 int (*pg_authenticate)(struct svc_rqst *);
412
+ __be32 (*pg_init_request)(struct svc_rqst *,
413
+ const struct svc_program *,
414
+ struct svc_process_info *);
415
+ int (*pg_rpcbind_set)(struct net *net,
416
+ const struct svc_program *,
417
+ u32 version, int family,
418
+ unsigned short proto,
419
+ unsigned short port);
400420 };
401421
402422 /*
....@@ -499,6 +519,9 @@
499519 void svc_reserve(struct svc_rqst *rqstp, int space);
500520 struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu);
501521 char * svc_print_addr(struct svc_rqst *, char *, size_t);
522
+int svc_encode_read_payload(struct svc_rqst *rqstp,
523
+ unsigned int offset,
524
+ unsigned int length);
502525 unsigned int svc_fill_write_vector(struct svc_rqst *rqstp,
503526 struct page **pages,
504527 struct kvec *first, size_t total);
....@@ -506,6 +529,19 @@
506529 struct kvec *first, void *p,
507530 size_t total);
508531 __be32 svc_return_autherr(struct svc_rqst *rqstp, __be32 auth_err);
532
+__be32 svc_generic_init_request(struct svc_rqst *rqstp,
533
+ const struct svc_program *progp,
534
+ struct svc_process_info *procinfo);
535
+int svc_generic_rpcbind_set(struct net *net,
536
+ const struct svc_program *progp,
537
+ u32 version, int family,
538
+ unsigned short proto,
539
+ unsigned short port);
540
+int svc_rpcbind_set_version(struct net *net,
541
+ const struct svc_program *progp,
542
+ u32 version, int family,
543
+ unsigned short proto,
544
+ unsigned short port);
509545
510546 #define RPC_MAX_ADDRBUFLEN (63U)
511547