Subject: [nfsv4] locks associated with close

From: [email-masked]
Date: Fri, 2 May 2003 15:16:45 -0400 (EDT)

I think I've got most of the stateid stuff figured out, but I'm still
stymied w.r.t. what locks are referred to by the open_stateid provided
to close. The spec. notes that it should either free the locks or
return an error if there are outstanding locks, but which locks are these?

My understanding (which could be wrong:-) is that a lock_owner is
distinct from an open_owner. Is there still an association between a
lock_owner and open_owner? Is it formed by the open_to_lock_owner4 case
for the lock op? (In other words, are all locks on all lock_owners that
were gotten by the open_to_lock_owner4 case for lock ops on the given
open_stateid the locks CLOSE is referring to?)

Thanks for any help with this, rick
_______________________________________________
nfsv4 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nfsv4

---

From: Spencer Shepler <[email-masked]>
Date: Fri, 2 May 2003 14:49:37 -0500

> return an error if there are outstanding locks, but which locks are these?

The locks established by the LOCK operation.

> open_stateid the locks CLOSE is referring to?)

lock_owner and open_owner are distinct but an association is created
at LOCK via the open_to_lock_owner4 as you suggest.  That data
structure associates to an open_owner by providing the open_stateid
(which also represents the open file).  Are you further correct in
that when CLOSE is processed the open_stateid provided to it is the
"parent" of the individual file locks that have been associated with
the file via the open_to_lock_owner4.  Ideally, the client will have
released/LOCKU all the file locks at the point of CLOSE.

-- 
Spencer