[121] in arla-drinkers
Re: flock and fcntl(F_SETLK)
daemon@ATHENA.MIT.EDU (Magnus Ahltorp)
Mon Jul 20 12:16:28 1998
From arla-drinkers-request@sundance.stacken.kth.se Mon Jul 20 16:16:24 1998
Return-Path: <arla-drinkers-request@sundance.stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 29008 invoked from network); 20 Jul 1998 16:16:21 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
by bloom-picayune.mit.edu with SMTP; 20 Jul 1998 16:16:21 -0000
Received: from yakko.stacken.kth.se (map@yakko.stacken.kth.se [130.237.234.52])
by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id SAA12975;
Mon, 20 Jul 1998 18:09:03 +0200 (MET DST)
Received: (from map@localhost)
by yakko.stacken.kth.se (8.8.8/8.8.7) id SAA19351;
Mon, 20 Jul 1998 18:08:44 +0200 (CEST)
Sender: map@stacken.kth.se
To: alan@lxorguk.ukuu.org.uk (Alan Cox)
Cc: linux-kernel@vger.rutgers.edu, arla-drinkers@stacken.kth.se
Subject: Re: flock and fcntl(F_SETLK)
References: <m0yy2SR-000aNQC@the-village.bc.nu>
From: Magnus Ahltorp <map@stacken.kth.se>
Date: 20 Jul 1998 18:08:43 +0200
In-Reply-To: alan@lxorguk.ukuu.org.uk's message of Mon, 20 Jul 1998 00:01:30 +0100 (BST)
Message-ID: <lv1ww98wlmc.fsf@yakko.stacken.kth.se>
Lines: 19
X-Mailer: Gnus v5.3/Emacs 19.34
> 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