OP_LOCK4: question about open_to_lock_owner4::lock_seqid
J. Bruce Fields
bfields at fieldses.org
Thu Jul 3 10:57:28 EDT 2008
On Thu, Jul 03, 2008 at 09:41:15AM +0200, DENIEL Philippe wrote:
> Hi to all,
>
> I need precisions about the way the lock_seqid field should be used in
> OP_LOCK4 in the case of a new lock owner.
> The RFC3540 says:
>
> The locker argument specifies the lock_owner that is associated with
> the LOCK request. The locker4 structure is a switched union that
> indicates whether the lock_owner is known to the server or if the
> lock_owner is new to the server. In the case that the lock_owner is
> known to the server and has an established lock_seqid, the argument
> is just the lock_owner and lock_seqid. *In the case that the
> lock_owner is not known to the server, the argument contains not only
> the lock_owner and lock_seqid but also the open_stateid and
> open_seqid. *The new lock_owner case covers the very first lock done
> by the lock_owner and offers a method to use the established state of
> the open_stateid to transition to the use of the lock_owner.
>
> It seems to me that a new lock owner will create a new state if lock is
> successful with a brand new stateid. This stateid will contain a seqid of 0.
> the open_to_lock_owner4::lock_seqid field is the "desired" seqid for the
> client, and since the lock owner is new, it can't be something else than
> 0. So both client and server knowns this value is to be 0.
> So far, I am wondering about the use of this field in the case of a new
> lock owner (if LOCK4arg::.locker.new_lock_owner == TRUE). Should I
> ignore it ? Should I check it is 0 and return an error if
> the value is not 0 ? The test LOCK8c from newpynfs seems to take this
> position: if LOCK4arg::.locker.new_lock_owner == TRUE and lock_seqid !=
> 0, NFS4ERR_BAD_SEQID should be returned.
My opinion is that clients should send 0, and servers should ignore it.
The linux server currently ignores it (and I run newpynfs with
noLOCK8C....).
This was discussed before (google for "relax new lock seqid check") but
I can't find a definitive conclusion.
--b.
> Is this the things to be implemented in my server ?
>
> Thanks in advance for your time and help
>
> Philippe
>
>
>
> _______________________________________________
> NFSv4 mailing list
> NFSv4 at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
More information about the NFSv4
mailing list