Subject: [nfsv4] re: ReleaseLockOwner

From: [email-masked]
Date: Sat, 6 Sep 2003 14:26:19 -0400 (EDT)

Well Dave, your response w.r.t. ReleaseLockOwner has reminded my about
an area of the RFC that still seems unclear to me (yea, I'm a bit slow,
ok, alright, I'm a Lot slow:-).

You mention that OpenOwners can be released when no outstanding Opens
remain, but that LockOwners have no similar situation.

But, isn't it true that LockOwners must be associated with OpenOwners
and cannot exist after the associated OpenOwner goes away?
(And, as such, can be released at the same time as the associated
OpenOwner?)

The first time I coded this part of my server, I didn't assume a
relationship, except for getting the new LockOwner, and that seemed
fine until I bumped into Close. Close requires that the server either
release all record locks associated with the Open or report an error.
(See Sec. 14.2.2, second para in under "Description".) This implies
a relationship between Opens and Locks and I've never been sure what
this relationship is and how to maintain it?

At this time, my server has a hierarchy of:
OpenOwner
	related Opens
		related Lockowners
			Locks (for that file opened by that OpenOwner)

Now, I'm pretty well convinced this is not correct, since it requires the
client to do a separate open_to_lock_owner4 for each of the files it
wants to do locks on. (Using the same lock_owner string.)

I'm now thinking the relationship is:
			OpenOwner
	related Opens			related LockOwners
					(ones that did open_to_lock_owner4
					 using a stateid for any of the
					 related Opens)
						Locks (for all files that
						       use this LockOwner)

Now, a Close looks for any Locks on any of the "related LockOwners" that
are for the same file as the Close.

In this case, there is still a relationship between OpenOwner and LockOwner.
(If that relationship doesn't exist, I can't see any way of tying Locks
 to Opens, so that Close can be correctly implemented.)

What does everyone think? rick

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

---

From: "William A.(Andy) Adamson" <[email-masked]>
Date: Mon, 08 Sep 2003 09:28:10 -0400

this is the way our server is being coded

-->Andy

[email-masked] said:
> Now, a Close looks for any Locks on any of the "related LockOwners"
> that are for the same file as the Close.