From owner-freebsd-geom@FreeBSD.ORG Tue Jun 30 21:53:47 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E6E6106564A for ; Tue, 30 Jun 2009 21:53:47 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id A91198FC22 for ; Tue, 30 Jun 2009 21:53:46 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 40424 invoked from network); 30 Jun 2009 16:53:46 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 30 Jun 2009 16:53:46 -0500 Received: (qmail 34420 invoked by uid 2001); 30 Jun 2009 21:53:45 -0000 Date: Tue, 30 Jun 2009 16:53:45 -0500 From: "Rick C. Petty" To: Marcel Moolenaar Message-ID: <20090630215345.GC33849@keira.kiwi-computer.com> References: <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> <20090629210003.GA24038@keira.kiwi-computer.com> <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com> User-Agent: Mutt/1.4.2.3i Cc: Ivan Voras , freebsd-geom@freebsd.org Subject: Re: gmirror gm0 destroyed on shutdown; GPT corrupt X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 21:53:47 -0000 On Tue, Jun 30, 2009 at 02:37:55PM -0700, Marcel Moolenaar wrote: > > On Jun 29, 2009, at 2:00 PM, Rick C. Petty wrote: > > >[[ Removing the double cross-post, since this is GEOM-specific ]] > > > >On Sat, Jun 27, 2009 at 06:20:49PM -0700, Marcel Moolenaar wrote: > >> > >>Using the last sector is not only flawed because it creates a race > >>condition, > > > >It shouldn't create a race condition. > > It does. I didn't say it didn't, I said it shouldn't. > Answer the following: > > foo0 is a provider with 3 sectors. > bar is a geom class that puts meta-data in the first sector. > baz is a geom class that puts meta-data in the last sector. > > Both bar and baz get to taste foo0. Which one should go first? Both bar and baz should validate their metadata and it should be pretty apparent that one of them has a smaller size. If the one that is smaller fits perfectly into the one that is bigger, the taste should pass to the latter first. Yes, it would be more complicated to implement, but there *should not* be a race condition because one container fits inside the other. It *should* only be a race condition if one of the classes does not decrease its size to store its metadata. I know of no geom providers which do this. In other words, I meant that it's deterministic. If GEOM can't handle that situation (which *should* be deterministic), then I believe it's broken. -- Rick C. Petty