diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-07-16 13:51:29 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-07-18 01:12:59 -0400 |
commit | 7402a4fedc2bc448100c2d086406c708451b16dc (patch) | |
tree | 45bafb2c535f1790f99e41cb7de2b7fb0c199c4e /fs/nfs | |
parent | 9f98effc19bd490a375c4e764a56a2c015d27c3c (diff) |
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.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 52de7245a2ee..39896afc6edf 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -8380,6 +8380,7 @@ static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args, | |||
8380 | { | 8380 | { |
8381 | unsigned int max_rqst_sz, max_resp_sz; | 8381 | unsigned int max_rqst_sz, max_resp_sz; |
8382 | unsigned int max_bc_payload = rpc_max_bc_payload(clnt); | 8382 | unsigned int max_bc_payload = rpc_max_bc_payload(clnt); |
8383 | unsigned int max_bc_slots = rpc_num_bc_slots(clnt); | ||
8383 | 8384 | ||
8384 | max_rqst_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxwrite_overhead; | 8385 | max_rqst_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxwrite_overhead; |
8385 | max_resp_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxread_overhead; | 8386 | max_resp_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxread_overhead; |
@@ -8402,6 +8403,8 @@ static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args, | |||
8402 | args->bc_attrs.max_resp_sz_cached = 0; | 8403 | args->bc_attrs.max_resp_sz_cached = 0; |
8403 | args->bc_attrs.max_ops = NFS4_MAX_BACK_CHANNEL_OPS; | 8404 | args->bc_attrs.max_ops = NFS4_MAX_BACK_CHANNEL_OPS; |
8404 | args->bc_attrs.max_reqs = max_t(unsigned short, max_session_cb_slots, 1); | 8405 | args->bc_attrs.max_reqs = max_t(unsigned short, max_session_cb_slots, 1); |
8406 | if (args->bc_attrs.max_reqs > max_bc_slots) | ||
8407 | args->bc_attrs.max_reqs = max_bc_slots; | ||
8405 | 8408 | ||
8406 | dprintk("%s: Back Channel : max_rqst_sz=%u max_resp_sz=%u " | 8409 | dprintk("%s: Back Channel : max_rqst_sz=%u max_resp_sz=%u " |
8407 | "max_resp_sz_cached=%u max_ops=%u max_reqs=%u\n", | 8410 | "max_resp_sz_cached=%u max_ops=%u max_reqs=%u\n", |