Subject: Re: [nfsv4] Locking Sematics

From: Syam Pannala <[email-masked]>
Date: Tue, 15 Mar 2005 22:22:08 -0800 (PST)

hi,

Firstly, when I said "fail operation X", I meant "fail operation X in
case it does not supply the appropriate stateid". I guess I should have
stated that also.

> A WRITE operation can only succeed if the stateid in that
> operation is the result of a lock_owner having acquired
> an exclusive record lock.
> A READ operation can only succeed if the stateid in that
> operation is the result of a lock_owner having acquired
> an exclusive or a shared record lock.

Actually, these semantics are different from what I had in mind. My
idea was to ignore locks on a READ and honor locks only a WRITE (i.e.
fail the WRITE if it does not supply the correct stateid). The above
model needs "at least" shared locks for read and an exclusive lock for
a write. In my model, you can either take shared or exclusive locks,
but they are enforced only against a WRITE operation. Ofcourse, one can
question the value of shared write locks, but the WebDAV protocol
allows them (hence they are probably not completely useless).

Have said that, I am now wondering if my model will cause problems with
existing/new nfsv4 clients trying to connect to my server. Is it the
general expection that byte range locks affect both the read and write
operations? Are there well known/any client applications that depend on
other people's READ being locked out?

In general, for every given server, there are probably clients that
depend on the exact server behavior towards locking. So I suppose my
question should be something along the lines of "Would enforcing locks
on WRITE only and not on READ result in client compatiblity issues?"

Thanks to everybody for the responses so far. Please let me know if you
need any clarification.

-- Syam

__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more. 
http://info.mail.yahoo.com/mail_250

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

---

From: Spencer Shepler <[email-masked]>
Date: Wed, 16 Mar 2005 15:30:54 -0800

> Thanks to everybody for the responses so far. Please let me know if you

To be precise, for mandatory file locking, the READ would receive
an error if the range conflcited with a mandatory WRITE lock.

Given that no previous version of NFS provide mandatory file locking
support, I doubt there are appilcations that depend on it.