Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2009 16:53:45 -0500
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        Ivan Voras <ivoras@freebsd.org>, freebsd-geom@freebsd.org
Subject:   Re: gmirror gm0 destroyed on shutdown; GPT corrupt
Message-ID:  <20090630215345.GC33849@keira.kiwi-computer.com>
In-Reply-To: <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com>
References:  <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <h24v15$70v$1@ger.gmane.org> <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> <20090629210003.GA24038@keira.kiwi-computer.com> <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090630215345.GC33849>