diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 6 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8d0c3a977c36..b829118c7e04 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4805,16 +4805,14 @@ static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args) | |||
4805 | args->fc_attrs.headerpadsz = 0; | 4805 | args->fc_attrs.headerpadsz = 0; |
4806 | args->fc_attrs.max_rqst_sz = mxrqst_sz; | 4806 | args->fc_attrs.max_rqst_sz = mxrqst_sz; |
4807 | args->fc_attrs.max_resp_sz = mxresp_sz; | 4807 | args->fc_attrs.max_resp_sz = mxresp_sz; |
4808 | args->fc_attrs.max_resp_sz_cached = mxresp_sz; | ||
4809 | args->fc_attrs.max_ops = NFS4_MAX_OPS; | 4808 | args->fc_attrs.max_ops = NFS4_MAX_OPS; |
4810 | args->fc_attrs.max_reqs = session->clp->cl_rpcclient->cl_xprt->max_reqs; | 4809 | args->fc_attrs.max_reqs = session->clp->cl_rpcclient->cl_xprt->max_reqs; |
4811 | 4810 | ||
4812 | dprintk("%s: Fore Channel : max_rqst_sz=%u max_resp_sz=%u " | 4811 | dprintk("%s: Fore Channel : max_rqst_sz=%u max_resp_sz=%u " |
4813 | "max_resp_sz_cached=%u max_ops=%u max_reqs=%u\n", | 4812 | "max_ops=%u max_reqs=%u\n", |
4814 | __func__, | 4813 | __func__, |
4815 | args->fc_attrs.max_rqst_sz, args->fc_attrs.max_resp_sz, | 4814 | args->fc_attrs.max_rqst_sz, args->fc_attrs.max_resp_sz, |
4816 | args->fc_attrs.max_resp_sz_cached, args->fc_attrs.max_ops, | 4815 | args->fc_attrs.max_ops, args->fc_attrs.max_reqs); |
4817 | args->fc_attrs.max_reqs); | ||
4818 | 4816 | ||
4819 | /* Back channel attributes */ | 4817 | /* Back channel attributes */ |
4820 | args->bc_attrs.headerpadsz = 0; | 4818 | args->bc_attrs.headerpadsz = 0; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index e437fd6a819f..020ebf151184 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1578,6 +1578,14 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1578 | char machine_name[NFS4_MAX_MACHINE_NAME_LEN]; | 1578 | char machine_name[NFS4_MAX_MACHINE_NAME_LEN]; |
1579 | uint32_t len; | 1579 | uint32_t len; |
1580 | struct nfs_client *clp = args->client; | 1580 | struct nfs_client *clp = args->client; |
1581 | u32 max_resp_sz_cached; | ||
1582 | |||
1583 | /* | ||
1584 | * Assumes OPEN is the biggest non-idempotent compound. | ||
1585 | * 2 is the verifier. | ||
1586 | */ | ||
1587 | max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + | ||
1588 | RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT; | ||
1581 | 1589 | ||
1582 | len = scnprintf(machine_name, sizeof(machine_name), "%s", | 1590 | len = scnprintf(machine_name, sizeof(machine_name), "%s", |
1583 | clp->cl_ipaddr); | 1591 | clp->cl_ipaddr); |
@@ -1592,7 +1600,7 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1592 | *p++ = cpu_to_be32(args->fc_attrs.headerpadsz); /* header padding size */ | 1600 | *p++ = cpu_to_be32(args->fc_attrs.headerpadsz); /* header padding size */ |
1593 | *p++ = cpu_to_be32(args->fc_attrs.max_rqst_sz); /* max req size */ | 1601 | *p++ = cpu_to_be32(args->fc_attrs.max_rqst_sz); /* max req size */ |
1594 | *p++ = cpu_to_be32(args->fc_attrs.max_resp_sz); /* max resp size */ | 1602 | *p++ = cpu_to_be32(args->fc_attrs.max_resp_sz); /* max resp size */ |
1595 | *p++ = cpu_to_be32(args->fc_attrs.max_resp_sz_cached); /* Max resp sz cached */ | 1603 | *p++ = cpu_to_be32(max_resp_sz_cached); /* Max resp sz cached */ |
1596 | *p++ = cpu_to_be32(args->fc_attrs.max_ops); /* max operations */ | 1604 | *p++ = cpu_to_be32(args->fc_attrs.max_ops); /* max operations */ |
1597 | *p++ = cpu_to_be32(args->fc_attrs.max_reqs); /* max requests */ | 1605 | *p++ = cpu_to_be32(args->fc_attrs.max_reqs); /* max requests */ |
1598 | *p++ = cpu_to_be32(0); /* rdmachannel_attrs */ | 1606 | *p++ = cpu_to_be32(0); /* rdmachannel_attrs */ |