Re: flock and fcntl(F_SETLK)

Magnus Ahltorp (map@stacken.kth.se)
20 Jul 1998 18:08:43 +0200


> The semantics of flock not locking on network file systems go back to
> SunOS and make some sense. flock() gives you a locking scheme that is
> local and fast, lockf/fcntl locks give you slow but networked NFS locks.

Indeed, this was the case in SunOS, but this is an excerpt from the
Solaris 2.5.1 man page for flock(2):

Locks obtained through the flock() mechanism under SunOS 4.1
were known only within the system on which they were placed.
This is no longer true.

In the OpenBSD 2.3 man page for flock(2), network file locking is not
mentioned. This means that a network file system is not a special case
lock-wise.

Why not give the file system an opportunity to handle this?

/Magnus
map@stacken.kth.se

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html