Subject: Re: A proposal for OPEN

From: Martin Pool <[email-masked]>
Date: Tue, 25 Nov 2003 11:19:10 +1100

On 25 Sep 2003, Joseph Galbraith <[email-masked]> wrote:

> I've heard these terms before, but I'm not sure I've had them
> clearly defined for me before.  Let me see if I'm anyplace close
> on what they mean :-)
> 
>   Mandatory Lock
>   ==============
>   Once I am granted a mandatory lock, I own it until
>   I release it.  Others trying to access the file in
>   a way that conflicts with my lock will receive an
>   error.
> 
>   Advisory Lock
>   =============
>   Once I am granted an advisory lock, I own it until
>   either I release it or the server notifies me that
>   it is breaking my lock.  Others trying to access the
>   file in a way that conflicts with my lock will result
>   in the server breaking my lock.

This is closer to what is called an "opportunistic lock/oplock" in
CIFS, or "reservation" in NFS4.

Adding oplocks implies that the server must be able to initiate
notifications to the client, and to discover and recover from network
partitions or hung clients.  It's quite complex.

-- 
Martin 
                               linux.conf.au -- Adelaide, January 2004

---

From: Nicolas Williams <[email-masked]>
Date: Tue, 25 Nov 2003 08:46:19 -0800

> partitions or hung clients.  It's quite complex.

It sure is.  SFTP is not a remote filesystem protocol - oplocks/
delegations do not belong in sftp.

OTOH, an optional OPEN option for requesting a guarantee that the file
transferred won't be modified during the transfer might be nice.

Nico
--