From: Mi Jinlong <mijinlong@cn.fujitsu.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: NFS <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfs41: make sure nfs server return right ca_maxresponsesize_cached
Date: Fri, 18 Mar 2011 11:04:53 +0800 [thread overview]
Message-ID: <4D82CBD5.3050800@cn.fujitsu.com> (raw)
In-Reply-To: <20110316151205.GA9299@fieldses.org>
J. Bruce Fields:
> On Thu, Mar 10, 2011 at 05:43:37PM +0800, Mi Jinlong wrote:
>> 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.
>
> I wonder what the reason for that is--I can't see why the client would
> object to the server increasing this. Oh well, my as well observe the
> MUST NOT; applied.
I just read the RFC and got it.
Agree with you.
--
thanks,
Mi Jinlong
>
> --b.
>
>>
>> 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>
>> ---
>> fs/nfsd/nfs4state.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
>> index 54b60bf..96edd02 100644
>> --- a/fs/nfsd/nfs4state.c
>> +++ b/fs/nfsd/nfs4state.c
>> @@ -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);
>> --
>> 1.7.4.1
>>
>>
>>
prev parent reply other threads:[~2011-03-18 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 9:43 [PATCH] nfs41: make sure nfs server return right ca_maxresponsesize_cached Mi Jinlong
2011-03-16 15:12 ` J. Bruce Fields
2011-03-18 3:04 ` Mi Jinlong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D82CBD5.3050800@cn.fujitsu.com \
--to=mijinlong@cn.fujitsu.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).