Subject: [nfsv4] Different interpretations of stateid.

From: [email-masked]
Date: Thu, 22 Jun 2006 11:18:37 -0400 (EDT)

In case my post yesterday wasn't clear (I'm usually not:-), here's an
example assuming that an open_owner isn't tied to a file:
- client opens foo with owner "xxx", gets stateidXXX
- client opens bar with owner "xxx", gets stateidXXX
- client closes foo with stateidXXX
*** stateidXXX is "not useful for operations that follow"
- client closes bar with stateidXXX
--> server fails this with something like NFS4ERR_BADSTATEID, since stateidXXX
    was rendered "not useful for operations that follow" by the previous close

Of course "not useful for operations that follow" is quoted from the end of
the IMPLEMENTATION para of sec. 14.2.2.

Whereas, if the server issues distinct stateids for each open:
- client opens foo with owner "xxx", gets stateidXXXfoo
- client opens bar with owner "xxx", gets stateidXXXbar
- client closes foo with stateidXXXfoo
- client closes bar with stateidXXXbar

The only way I can see the first example working is if "not useful for
operations that follow" doesn't mean what I read it to mean? rick

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

---

From: Benny Halevy <[email-masked]>
Date: Thu, 22 Jun 2006 21:08:12 +0300

> operations that follow" doesn't mean what I read it to mean? rick

My interpretation was always that the stateid is associated with the file.
I think you took "not useful for operations that follow" in 14.2.2 out of 
context.  Here's the full context:

    Even though CLOSE returns a stateid, this stateid is not useful to
    the client and should be treated as deprecated.  CLOSE "shuts down"
    the state associated with all OPENs for the file by a single
    open_owner.  As noted above, CLOSE will either release all file
    locking state or return an error.  Therefore, the stateid returned by
    CLOSE is not useful for operations that follow.

My quote would then be "CLOSE "shuts down" the state associated with all OPENs 
for the file by a single open_owner".  Hence the stateid represents "the state
associated with all OPENs for the file by a single open_owner" and "operations
that follow" relate to state changing operations issued by this open_owner
on this file.