Cooper wrote:
> What's the significant difference between share reservation and lock in NFSv4 
> except their creation and removal.
> 
> Under what condition one of them is preferable to the other? And how does 
> opensolaris implementation use them

NFSv4 file locks are there to support POSIX file locks.  These are byte
range locks, generally advisory and set by fcntl() on unix clients.
They pretty much obey the POSIX rules for file locks.

NFSv4 share reservations are there to support WIN32 API share
reservation bits.  These bits lock the entire file, are typically
mandatory, and are set on open.

Application writers should decide which of these fits
their specific need.  However, the opensolaris
open(2) interface does not support share reservations.

In general, applications intended to run in unix environments
are probably better off using POSIX file locking.  They will
work across all variants and will work with v3.

-- 
Bill Baker, Sun NFS development

Reply via email to