| .. | .. |
|---|
| 109 | 109 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ |
|---|
| 110 | 110 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no |
|---|
| 111 | 111 | * 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 */ |
|---|
| 113 | 113 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
|---|
| 114 | 114 | }; |
|---|
| 115 | 115 | |
|---|
| .. | .. |
|---|
| 254 | 254 | struct page * *rq_page_end; /* one past the last page */ |
|---|
| 255 | 255 | |
|---|
| 256 | 256 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ |
|---|
| 257 | + struct bio_vec rq_bvec[RPCSVC_MAXPAGES]; |
|---|
| 257 | 258 | |
|---|
| 258 | 259 | __be32 rq_xid; /* transmission id */ |
|---|
| 259 | 260 | u32 rq_prog; /* program number */ |
|---|
| .. | .. |
|---|
| 299 | 300 | struct net *rq_bc_net; /* pointer to backchannel's |
|---|
| 300 | 301 | * net namespace |
|---|
| 301 | 302 | */ |
|---|
| 303 | + void ** rq_lease_breaker; /* The v4 client breaking a lease */ |
|---|
| 302 | 304 | }; |
|---|
| 303 | 305 | |
|---|
| 304 | 306 | #define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net) |
|---|
| .. | .. |
|---|
| 380 | 382 | struct cache_deferred_req handle; |
|---|
| 381 | 383 | size_t xprt_hlen; |
|---|
| 382 | 384 | 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 | + }; |
|---|
| 384 | 396 | }; |
|---|
| 385 | 397 | |
|---|
| 386 | 398 | /* |
|---|
| .. | .. |
|---|
| 397 | 409 | char * pg_class; /* class name: services sharing authentication */ |
|---|
| 398 | 410 | struct svc_stat * pg_stats; /* rpc statistics */ |
|---|
| 399 | 411 | 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); |
|---|
| 400 | 420 | }; |
|---|
| 401 | 421 | |
|---|
| 402 | 422 | /* |
|---|
| .. | .. |
|---|
| 499 | 519 | void svc_reserve(struct svc_rqst *rqstp, int space); |
|---|
| 500 | 520 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); |
|---|
| 501 | 521 | 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); |
|---|
| 502 | 525 | unsigned int svc_fill_write_vector(struct svc_rqst *rqstp, |
|---|
| 503 | 526 | struct page **pages, |
|---|
| 504 | 527 | struct kvec *first, size_t total); |
|---|
| .. | .. |
|---|
| 506 | 529 | struct kvec *first, void *p, |
|---|
| 507 | 530 | size_t total); |
|---|
| 508 | 531 | __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); |
|---|
| 509 | 545 | |
|---|
| 510 | 546 | #define RPC_MAX_ADDRBUFLEN (63U) |
|---|
| 511 | 547 | |
|---|