Subject: [nfsv4] comparison of seqid

From: <[email-masked]>
Date: Mon, 22 Nov 2010 08:04:58 -0500

Hi, all
On page 161 of RFC 5661, I found the following description about comparison of seqid:
"In making comparisons between seqids, both by the client in
determining the order of operations and by the server in determining
whether the NFS4ERR_OLD_STATEID is to be returned, the possibility of
the seqid being swapped around past the NFS4_UINT32_MAX value needs
to be taken into account. When two seqid values are being compared,
the total count of slots for all sessions associated with the current
client is used to do this. When one seqid value is less than this
total slot count and another seqid value is greater than
NFS4_UINT32_MAX minus the total slot count, the former is to be
treated as lower than the latter, despite the fact that it is
numerically greater."
It looks to me the last sentence expresses a contrary meaning.
the "lower than" should be "higher than"
the "greater" should be "smaller"

Is it my misunderstanding or a bug in the spec?

--
Albert

---

From: Trond Myklebust <[email-masked]>
Date: Mon, 22 Nov 2010 09:05:06 -0500

> Is it my misunderstanding or a bug in the spec?

The whole paragraph looks confused in that it appears to be conflating
stateid sequence ids and session slot numbers.

I assume that it is just trying to say that comparisons need to take
into account the fact that seqids are defined modulo NFS4_UINT32_MAX and
so you need to beware when the wrap around occurs.

Cheers
  Trond

---

From: <[email-masked]>
Date: Mon, 22 Nov 2010 09:28:07 -0500

Bug.  Simplest fix is to swap "former" and "latter".
 
Thanks.

________________________________

From: [email-masked] [mailto:[email-masked]] On Behalf
Of [email-masked]
Sent: Monday, November 22, 2010 8:05 AM
To: [email-masked]
Subject: [nfsv4] comparison of seqid

Hi, all

On page 161 of RFC 5661, I found the following description about
comparison of seqid:

numerically greater."

 

--

Albert

---

From: Fred Isaman <[email-masked]>
Date: Mon, 22 Nov 2010 09:50:28 -0500

Note as Trond hints at, the paragraph also assumes that the sequence
id window is somehow related to the number of slots (max number of
outstanding RPCs).  This is not true at all.  Take the simple case of
two slots.  The reply in slot 1 gets delayed on the wire for a bit,
while we process 2 or 3 RPCs on slot 2.  When we finally see the reply
on slot 1, it will be out of the seqid window described, despite there
only being two outstanding RPCs at a time.  For seqid comparisons I've
just been using a fixed window size of 2**31.

Fred

On Mon, Nov 22, 2010 at 9:28 AM,  <[email-masked]> wrote:
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> [email-masked]
> “In making comparisons between seqids, both by the client in
>
> numerically greater.”
> the “lower than” should be “higher than”
>
> the “greater” should be “smaller”
>
>
>
> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4
>
>

---

From: <[email-masked]>
Date: Mon, 22 Nov 2010 10:28:35 -0500

Trond wrote:
> I assume that it is just trying to say that comparisons need 
> to take into account the fact that seqids are defined modulo 
> NFS4_UINT32_MAX and so you need to beware when the wrap 
> around occurs. 

The point is that the sender is the only one who truly knows when wraparound occurs.  I was looking for some standard to define, from the receiver's point of view, when he should and should not presume that wraparound has occurred.  The fact that I made a mess of doing that doesn't mean that it isn't needed. 

Fred wrote:
> For seqid comparisons I've just been using a fixed window 
> size of 2**31.

Makes sense.  I'll draft a revised paragraph and send it to the working group, with the intention of dealing with this via the errata mechanism.

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Fred Isaman
Sent: Monday, November 22, 2010 9:50 AM
To: Noveck, David
Cc: Guo, Albert; [email-masked]
Subject: Re: [nfsv4] comparison of seqid

Fred