History

SUNRPC: Fix up backchannel slot table accounting

Add a per-transport maximum limit in the socket case, and add helpers to allow the NFSv4 code to discover that limit.

Trond Myklebust committed 7 years ago

Commit 7402a4f1 parent 9f98eff11 files · +55 −21Browse files

Showing the changes to include/linux (3 of 11 files). Show all

Unified · Split

3 files
  1. include/linux/sunrpc/bc_xprt.h +1 −0
  2. include/linux/sunrpc/clnt.h +1 −0
  3. include/linux/sunrpc/xprt.h +4 −2
include/linux/sunrpc/bc_xprt.h+1−0
@@ -43,6 +43,7 @@ void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); · 42 unmodified lines
43int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);43int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);
44void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);44void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);
45void xprt_free_bc_rqst(struct rpc_rqst *req);45void xprt_free_bc_rqst(struct rpc_rqst *req);
46unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt);
46 47
47/*48/*
48 * Determine if a shared backchannel is in use49 * Determine if a shared backchannel is in use
include/linux/sunrpc/clnt.h+1−0
@@ -194,6 +194,7 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); · 193 unmodified lines
194struct net * rpc_net_ns(struct rpc_clnt *);194struct net * rpc_net_ns(struct rpc_clnt *);
195size_t rpc_max_payload(struct rpc_clnt *);195size_t rpc_max_payload(struct rpc_clnt *);
196size_t rpc_max_bc_payload(struct rpc_clnt *);196size_t rpc_max_bc_payload(struct rpc_clnt *);
197unsigned int rpc_num_bc_slots(struct rpc_clnt *);
197void rpc_force_rebind(struct rpc_clnt *);198void rpc_force_rebind(struct rpc_clnt *);
198size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t);199size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t);
199const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);200const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);
include/linux/sunrpc/xprt.h+4−2
@@ -158,6 +158,7 @@ struct rpc_xprt_ops { · 157 unmodified lines
158 int (*bc_setup)(struct rpc_xprt *xprt,158 int (*bc_setup)(struct rpc_xprt *xprt,
159 unsigned int min_reqs);159 unsigned int min_reqs);
160 size_t (*bc_maxpayload)(struct rpc_xprt *xprt);160 size_t (*bc_maxpayload)(struct rpc_xprt *xprt);
161 unsigned int (*bc_num_slots)(struct rpc_xprt *xprt);
161 void (*bc_free_rqst)(struct rpc_rqst *rqst);162 void (*bc_free_rqst)(struct rpc_rqst *rqst);
162 void (*bc_destroy)(struct rpc_xprt *xprt,163 void (*bc_destroy)(struct rpc_xprt *xprt,
163 unsigned int max_reqs);164 unsigned int max_reqs);
@@ -251,8 +252,9 @@ struct rpc_xprt { · 87 unmodified lines
251#if defined(CONFIG_SUNRPC_BACKCHANNEL)252#if defined(CONFIG_SUNRPC_BACKCHANNEL)
252 struct svc_serv *bc_serv; /* The RPC service which will */253 struct svc_serv *bc_serv; /* The RPC service which will */
253 /* process the callback */254 /* process the callback */
254 int bc_alloc_count; /* Total number of preallocs */255 unsigned int bc_alloc_max;
255 atomic_t bc_free_slots;256 unsigned int bc_alloc_count; /* Total number of preallocs */
257 atomic_t bc_slot_count; /* Number of allocated slots */
256 spinlock_t bc_pa_lock; /* Protects the preallocated258 spinlock_t bc_pa_lock; /* Protects the preallocated
257 * items */259 * items */
258 struct list_head bc_pa_list; /* List of preallocated260 struct list_head bc_pa_list; /* List of preallocated

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t