From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [Linux-cluster] Re: GFS, what's remaining Date: Sun, 4 Sep 2005 02:18:36 -0700 Message-ID: <20050904021836.4d4560a5.akpm@osdl.org> References: <20050901104620.GA22482@redhat.com> <200509040022.37102.phillips@istop.com> <20050903214653.1b8a8cb7.akpm@osdl.org> <200509040240.08467.phillips@istop.com> <20050904002828.3d26f64c.akpm@osdl.org> <20050904080102.GY8684@ca-server1.us.oracle.com> <20050904011805.68df8dde.akpm@osdl.org> <20050904091118.GZ8684@ca-server1.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: phillips@istop.com, linux-cluster@redhat.com, wim.coekaerts@oracle.com, linux-fsdevel@vger.kernel.org, ak@suse.de, linux-kernel@vger.kernel.org Return-path: Received: from smtp.osdl.org ([65.172.181.4]:60612 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1751313AbVIDJUe (ORCPT ); Sun, 4 Sep 2005 05:20:34 -0400 To: Joel Becker In-Reply-To: <20050904091118.GZ8684@ca-server1.us.oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Joel Becker wrote: > > I can't see how that works easily. I'm not worried about a > tarball (eventually Red Hat and SuSE and Debian would have it). I'm > thinking about this shell: > > exec 7 do stuff > exec 7 > If someone kills the shell while stuff is doing, the lock is unlocked > because fd 7 is closed. However, if you have an application to do the > locking: > > takelock domainxxx lock1 > do sutff > droplock domainxxx lock1 > > When someone kills the shell, the lock is leaked, becuase droplock isn't > called. And SEGV/QUIT/-9 (especially -9, folks love it too much) are > handled by the first example but not by the second. take-and-drop-lock -d domainxxx -l lock1 -e "do stuff"