On Wed, Sep 15, 2004 at 10:21:55AM -0700, Richard Sharpe wrote:
> On Wed, 15 Sep 2004, Christopher R. Hertel wrote:

:
> Hmmm, there are several issues here, I think.


This is CIFS we're talking about.

> Firstly, was the file being accessed from UNIX and attempting to use fcntl
> or etc advisory locking? Also, were these being mapped to CIFS byte-range
> locks via smbfs/cifsvfs?


According to Mr. Bartlett, smbfs doesn't do proper locking. That's what
was being used. Ouch.

> Secondly, it seems that there is need for a standard around the correct
> interaction between CIFS and UNIX locks.
>
> Steve French and I discussed this briefly at CIFS2004 but we have not
> taken it much further.


Perhaps as part of the Unix extensions?

> I do think that it will be worth writing an RFC on this topic. There has
> been some work by HP, but I do not think it addresses all the issues.


We have a site now running that might work for writing such a document.

> The issues that must be addressed include how do CIFS byte-range and
> share-mode locks interact with UNIX advisory locks and UNIX/NFS read and
> write operations as well as how do UNIX advisory locks interact with CIFS
> byte-range and share-mode locks as well as read and write operations etc.
>
> A helpful way to look at this, ISTM, is to separate locking out from IO
> operations.
>
> The spec should also point out those areas in which you can lose. Ie, if a
> Windows user has a lock on a file, and a UNIX app does not bother to use
> advisory locking before accessing the file, you can lose.


Sounds like you could hammer out a draft...

Chris -)-----

--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh@ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh@ubiqx.org