Administration

VisionFS file locking

VisionFS has an independent component, called the lock daemon, which provides full Windows locking semantics. The lock daemon manages lock requests from Windows clients and maintains a lock database containing information about all file locks currently in place. When a client requests access to a file in a share, VisionFS consults the lock daemon for the availability of that file, and access is granted or denied as appropriate.

VisionFS provides three types of locks for clients to use with files:

Lock type
Description

Open lock
Used when a file is first opened. These locks let you specify exactly which actions other users are allowed to perform on a file while you are using it.

Record lock
Used to prevent other users from accessing a particular portion of a file while you are using it.

Opportunistic lock
Gives the user complete control over a file while they are using it. If another user needs to edit the file, the client with the opportunistic lock is asked to relinquish its lock and lock again with an Open lock or a Record lock.

Should I use opportunistic locks?

Opportunistic locks give great performance benefits -- one user has complete control over the entire file at one time and can edit a local copy, only updating the file on the server immediately before the lock is removed.

However, opportunistic locks don't provide protection from simultaneous editing by a Windows user and a UNIX user.

You should use opportunistic locks in the following cases:

You shouldn't use opportunistic locks if the files in a share might be modified by both Windows clients and UNIX users.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999