Subject: [nfsv4] NFS4ERR_EXPIRED vs NFS4ERR_BAD_STATEID

From: [email-masked]
Date: Tue, 7 Mar 2006 17:58:37 -0500 (EST)

For the following scenario:
	Client A - holds write lock on byte 0 of foo, gets StateidAfoo
	Client A - is network partitioned from server
	Client B - gets write lock on byte 0 of foo after Client A lease
		expires, with StateidBfoo
	- network partition for Client A heals
	Now, when Client A attempts to use the StateidAfoo, what should
	the server return?

At Connectathon06, some servers returned NFS4ERR_EXPIRED and others
returned NFS4ERR_BAD_STATEID. Can either error be used for this case?
(If so, I need to tweak my client to handle both.)

Thanks for any info, rick

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

---

From: Spencer Shepler <[email-masked]>
Date: Tue, 7 Mar 2006 17:51:22 -0600

> (If so, I need to tweak my client to handle both.)

Well, the specification is vague enough to allow both but I prefer
that the server return _EXPIRED in the cases where all of the client's 
state is expired so that it has a better chance of recovering.

There is text that would lead one to believe that _BAD_STATEID
should be returned if the client's lease has NOT expired and the
client has just chosen to use a stateid that is not valid.  This
is of course different than returning _OLD_STATEID.  The sections
that I am thinking of are 6.1.3 and 6.10.1.

In summary, the client needs to be prepared for both and in general
the server should more often than not return _EXPIRED.

Spencer