Skip to content

Commit

Permalink
nfs41: make sure nfs server return right ca_maxresponsesize_cached
Browse files Browse the repository at this point in the history
According to rfc5661,

  ca_maxresponsesize_cached:

     Like ca_maxresponsesize, but the maximum size of a reply that
     will be stored in the reply cache (Section 2.10.6.1).  For each
     channel, the server MAY decrease this value, but MUST NOT
     increase it.

the latest kernel(2.6.38-rc8) may increase the value for ignoring
request's ca_maxresponsesize_cached value. We should not ignore it.

Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Mi Jinlong authored and J. Bruce Fields committed Mar 16, 2011
1 parent 0a5e5f1 commit d2b2174
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ static void init_forechannel_attrs(struct nfsd4_channel_attrs *new, struct nfsd4
u32 maxrpc = nfsd_serv->sv_max_mesg;

new->maxreqs = numslots;
new->maxresp_cached = slotsize + NFSD_MIN_HDR_SEQ_SZ;
new->maxresp_cached = min_t(u32, req->maxresp_cached,
slotsize + NFSD_MIN_HDR_SEQ_SZ);
new->maxreq_sz = min_t(u32, req->maxreq_sz, maxrpc);
new->maxresp_sz = min_t(u32, req->maxresp_sz, maxrpc);
new->maxops = min_t(u32, req->maxops, NFSD_MAX_OPS_PER_COMPOUND);
Expand Down

0 comments on commit d2b2174

Please sign in to comment.