提交 35c036ef 编写于 作者: J J. Bruce Fields 提交者: Trond Myklebust

nfs: RPC_MAX_AUTH_SIZE is in bytes

The units of RPC_MAX_AUTH_SIZE is bytes, not 4-byte words.  This causes
the client to request a larger-than-necessary session replay slot size.
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 9e66317d
...@@ -1842,8 +1842,8 @@ static void encode_create_session(struct xdr_stream *xdr, ...@@ -1842,8 +1842,8 @@ static void encode_create_session(struct xdr_stream *xdr,
* Assumes OPEN is the biggest non-idempotent compound. * Assumes OPEN is the biggest non-idempotent compound.
* 2 is the verifier. * 2 is the verifier.
*/ */
max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + 2)
RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT; * XDR_UNIT + RPC_MAX_AUTH_SIZE;
encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr); encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr);
p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12); p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册