From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mi Jinlong <mijinlong@cn.fujitsu.com>
Cc: NFSv3 list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFS4.1: Fix bug server don't reply the right fore_channel to client at create_session
Date: Wed, 29 Dec 2010 14:35:52 -0500 [thread overview]
Message-ID: <20101229193551.GB12218@fieldses.org> (raw)
In-Reply-To: <4CE0EB7B.5060509@cn.fujitsu.com>
On Mon, Nov 15, 2010 at 04:12:43PM +0800, Mi Jinlong wrote:
>
>
> J. Bruce Fields:
> > On Thu, Nov 11, 2010 at 06:03:40PM +0800, Mi Jinlong wrote:
> >> At the latest kernel(2.6.37-rc1), server just initialize the forechannel
> >> at init_forechannel_attrs, but don't reflect it to reply.
> >>
> >> After initialize the session success, we should copy the forechannel info
> >> to nfsd4_create_session struct.
> >
> > Thanks!
> >
> > Is there a chance you could write a pynfs test for this?
>
> Maybe the following one is OK.
Yes, thanks very much. But could we use a larger MAX_SLOTS_PER_SESSION
value, to increase the chances this test will make sense for any
server?
Also, this is a "reply", not a "replay", test, so move it a little
later; how about the following?
--b.
commit bf41254ab3583f6e41c96b1861956dd31595928d
Author: Mi Jinlong <mijinlong@cn.fujitsu.com>
Date: Mon Nov 15 16:12:43 2010 +0800
SRVR: Can server return fore_channel maxreqs correctly
When client set the fore_channel maxreqs larger than server's
NFSD_MAX_SLOTS_PER_SESSION at create_session, the fore_channel
maxreqs at the reply must less than NFSD_MAX_SLOTS_PER_SESSION.
At 2.6.37-rc1, the NFSD_MAX_SLOTS_PER_SESSION is 160.
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/nfs4.1/server41tests/st_create_session.py b/nfs4.1/server41tests/st_create_session.py
index 5f425d4..efb2641 100644
--- a/nfs4.1/server41tests/st_create_session.py
+++ b/nfs4.1/server41tests/st_create_session.py
@@ -363,3 +363,23 @@ def testCallbackVersion(t, env):
(cb_occurred.low, cb_occurred.hi, cb_occurred.vers))
finally:
env.c1._check_version = orig
+
+def testMaxreqs(t, env):
+ """A CREATE_SESSION with maxreqs too large should return
+ a modified value
+
+ FLAGS: create_session all
+ CODE: CSESS22
+ """
+ # Assuming this is too large for any server; increase if necessary:
+ TOO_MANY_SLOTS = 1000000
+
+ c = env.c1.new_client(env.testname(t))
+ # CREATE_SESSION with fore_channel = TOO_MANY_SLOTS
+ chan_attrs = channel_attrs4(0,8192,8192,8192,128, TOO_MANY_SLOTS, [])
+ sess1 = c.create_session(fore_attrs=chan_attrs)
+
+ if nfs4lib.test_equal(sess1.fore_channel.maxrequests,
+ chan_attrs.ca_maxrequests, "count4"):
+ fail("Server allows surprisingly large fore_channel maxreqs");
next prev parent reply other threads:[~2010-12-29 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 10:03 [PATCH] NFS4.1: Fix bug server don't reply the right fore_channel to client at create_session Mi Jinlong
2010-11-11 13:32 ` Benny Halevy
2010-11-12 20:45 ` J. Bruce Fields
2010-11-15 8:12 ` Mi Jinlong
2010-12-29 19:35 ` J. Bruce Fields [this message]
2010-12-30 3:16 ` Mi Jinlong
2011-01-05 1:00 ` J. Bruce Fields
2011-01-05 5:56 ` Mi Jinlong
2011-01-05 17:35 ` J. Bruce Fields
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=20101229193551.GB12218@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mijinlong@cn.fujitsu.com \
/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).