Subject: clarification of open_owner/lock_owner/file association

From: Spencer Shepler <[email-masked]>
Date: Sun, 3 Mar 2002 18:40:59 -0600

Based on a discussion here at Connectathon, we need one last
clarification of the scope of the open_owner/lock_owner and their
respective sequence ids.

So here are the associations and followup example of how the state is
to be handled:

open_owner4 (for entire client) ==> open-sequence-id

open_owner4 + open-sequence-id + file  ==>  open_stateid

open_stateid + lock_owner4  ==>  lock-seqid

open_stateid + lock_owner4 + lock-seqid  ==>  lock_stateid

Narrative:

The open_owner4's sequence id is for the entire client.  This means
that the client will need to serialize OPEN's for an open_owner4 such
that the sequence ids arrive appropriately at the server.

The open_stateid represents an open_owner4 and file association.

The lock sequence id is associated with an open_owner4, file, and
lock_owner4.  This means that the same lock_owner4 will have separate
lock sequence id spaces for each file.  

Scenario:

OPEN [ open_owner == OO-A ] [ open_seqid == 1 ]  ==>  [ open_stateid == A ]

LOCK [ open_stateid == A ] [ open_seqid == 2 ]
     [ lock_owner == LO-Y ] [ lock_seqid == 1 ]  ==>  [ lock_stateid == B ]

UNLOCK [ lock_stateid == B ] [ lock_seqid == 2 ] ==>  [ lock_stateid == B' ]

CLOSE [ open_stateid == A ] [ open_seqid == 3 ] ==> [ open_stateid == A' ]

OPEN [ open_owner == OO-A ] [ open_seqid == 4 ] ==> [ open_stateid == C ]

LOCK [ open_stateid == C ] [ open_seqid == 5 ]
     [ lock_owner == LO-Y ] [ lock_seqid == 1 ]  ==>  [ lock_stateid == D ]

This scenario is meant to show that on the CLOSE, the state associated
with the lock_owner4 LO-Y is released.  The second OPEN/LOCK sequence
instantiates the lock_owner4 LO-Y as if it were new to the server.
The sequence id that is used for that lock owner has started at '1'
again.

-- 
Spencer