Subject: [nfsv4] NFSv4.1 sr_highest_slotid value

From: Rick Macklem <[email-masked]>
Date: Tue, 30 Aug 2011 18:50:57 -0400 (EDT)

Hi,

When an NFSv4.1 server replies with ca_maxrequests == 32
to a Create_session, it is my understanding that this implies
slotids 0<->31. (Pretty clear from the text.)

Now, this describes the sr_highest_slotid for a Sequence reply:
   The sa_highest_slotid argument is the highest slot ID for which the
   client has a request outstanding; it could be equal to sa_slotid.
   The server returns two "highest_slotid" values: sr_highest_slotid and
   sr_target_highest_slotid.  The former is the highest slot ID the
   server will accept in future SEQUENCE operation, and SHOULD NOT be
   less than the value of sa_highest_slotid (but see Section 2.10.6.1
   for an exception).  The latter is the highest slot ID the server
   would prefer the client use on a future SEQUENCE operation.

Reading this, I would have thought that a server would reply with
both sr_highest_slotid and sr_target_highest_slotid == 31 for the
above, if the server doesn't want the slot table size to change.

Does that sound correct?
(Basically, I am seeing a server replying 32 for this case, so I'm
 wondering if I have misinterpreted the above or the server has an off-by-1
 bug? Btw, the only server I have to test against is Fedora15, hint, hint:-)

rick

---

From: Trond Myklebust <[email-masked]>
Date: Tue, 30 Aug 2011 22:56:35 -0400

>  bug? Btw, the only server I have to test against is Fedora15, hint, hint:-)

Why? Section 18.36.3 states:

        For the fore channel, the server MAY change the requested value.

However the same section also says that:

        Subsequent requests will each be assigned a slot identifier by
        the requester within the range zero to ca_maxrequests - 1
        inclusive.

So I interpret that to mean that the first few requests to be sent MUST
be bounded by the 'ca_maxrequests - 1' limit. However the server is free
to change that by setting sr_highest_slotid in the reply to whatever
larger value it wants (usually in response to a sa_highest_slotid
argument that is of the same order as the initial ca_maxrequests).

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
[email-masked]
www.netapp.com

---

From: Rick Macklem <[email-masked]>
Date: Wed, 31 Aug 2011 08:36:31 -0400 (EDT)

Trond Myklebust wrote:
> be bounded by the 'ca_maxrequests - 1' limit.
Yes, this all seems clear to me, but was not what I intended to ask
about (sorry for any confusion coming from a poorly worded question).

> However the server is
> free
Yes, I agree that the server can increase the value if it wants to,
by setting sr_highest_target_slotid to an appropriate value. My question
is... Is the appropriate value the "size of the slot table" or "the largest
value that slotid can have"?
Rephrasing my question...
If a server wants to increase the # of slots from 32 to 33, so that
the range is 0<->32, would it set sr_highest_slotid to 32 or 33?
(To me, it reads that sr_highest_slotid is the largest "value" for
 slotid and therefore 32 would be the answer.)

I doubt that the Linux server intended to increase the slot table
size by 1 on the first sequenced compound RPC.

rick
> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4

---

From: "J. Bruce Fields" <[email-masked]>
Date: Wed, 31 Aug 2011 15:36:11 -0400

> size by 1 on the first sequenced compound RPC.

Yeah, sounds like a bug; I'll post a patch to the appropriate list and
cc you.

--b.