From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Becker Subject: Re: Re: GFS, what's remaining Date: Mon, 5 Sep 2005 16:32:36 -0700 Message-ID: <20050905233236.GF8684@ca-server1.us.oracle.com> References: <20050901104620.GA22482@redhat.com> <20050903183241.1acca6c9.akpm@osdl.org> <20050904030640.GL8684@ca-server1.us.oracle.com> <200509040022.37102.phillips@istop.com> <20050903214653.1b8a8cb7.akpm@osdl.org> <1125823035.23858.10.camel@localhost.localdomain> Reply-To: linux clustering Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Daniel Phillips , linux-cluster@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ak@suse.de Return-path: To: Alan Cox Content-Disposition: inline In-Reply-To: <1125823035.23858.10.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cluster-bounces@redhat.com Errors-To: linux-cluster-bounces@redhat.com List-Id: linux-fsdevel.vger.kernel.org On Sun, Sep 04, 2005 at 09:37:15AM +0100, Alan Cox wrote: > I am curious why a lock manager uses open to implement its locking > semantics rather than using the locking API (POSIX locks etc) however. Because it is simple (how do you fcntl(2) from a shell fd?), has no ranges (what do you do with ranges passed in to fcntl(2) and you don't support them?), and has a well-known fork(2)/exec(2) pattern. fcntl(2) has a known but less intuitive fork(2) pattern. The real reason, though, is that we never considered fcntl(2). We could never think of a case when a process wanted a lock fd open but not locked. At least, that's my recollection. Mark might have more to comment. Joel -- "In the room the women come and go Talking of Michaelangelo." Joel Becker Senior Member of Technical Staff Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127