From owner-freebsd-geom@FreeBSD.ORG  Wed Apr 22 07:59:52 2009
Return-Path: <owner-freebsd-geom@FreeBSD.ORG>
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 3D4E910656B2
	for <freebsd-geom@freebsd.org>; Wed, 22 Apr 2009 07:59:52 +0000 (UTC)
	(envelope-from p.dawidek@wheel.pl)
Received: from mx3.wheel.pl (grom.wheel.pl [91.121.70.66])
	by mx1.freebsd.org (Postfix) with ESMTP id E56038FC14
	for <freebsd-geom@freebsd.org>; Wed, 22 Apr 2009 07:59:51 +0000 (UTC)
	(envelope-from p.dawidek@wheel.pl)
Received: from localhost (unknown [10.10.2.1])
	by mx3.wheel.pl (Postfix) with ESMTP id 0505815853;
	Wed, 22 Apr 2009 09:59:51 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mx3.wheel.pl
Received: from mx3.wheel.pl ([10.10.2.1])
	by localhost (mx3.wheel.pl [10.10.2.1]) (amavisd-new, port 10024)
	with ESMTP id l7nnpMhYMexJ; Wed, 22 Apr 2009 09:59:50 +0200 (CEST)
Received: from mail.wheel.pl (ghf58.internetdsl.tpnet.pl [83.12.187.58])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx3.wheel.pl (Postfix) with ESMTPS id C701B1584C;
	Wed, 22 Apr 2009 09:59:49 +0200 (CEST)
Received: from localhost (unknown [10.0.2.3])
	by mail.wheel.pl (Postfix) with ESMTP id 09C7C2A4DB;
	Wed, 22 Apr 2009 09:59:49 +0200 (CEST)
Received: from mail.wheel.pl ([10.0.2.3])
	by localhost (mail.wheel.pl [10.0.2.3]) (amavisd-new, port 10024)
	with ESMTP id X4e0UreXgtG8; Wed, 22 Apr 2009 09:59:48 +0200 (CEST)
Received: from localhost (pjd.wheel.pl [10.0.1.1])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.wheel.pl (Postfix) with ESMTP id 38D102A4D5;
	Wed, 22 Apr 2009 09:59:47 +0200 (CEST)
Date: Wed, 22 Apr 2009 09:59:57 +0200
From: Pawel Jakub Dawidek <pjd@FreeBSD.org>
To: Andriy Gapon <avg@icyb.net.ua>
Message-ID: <20090422075957.GB1663@garage.freebsd.pl>
References: <49EDCA21.70908@icyb.net.ua>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW"
Content-Disposition: inline
In-Reply-To: <49EDCA21.70908@icyb.net.ua>
User-Agent: Mutt/1.4.2.3i
X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc
X-OS: FreeBSD 8.0-CURRENT i386
Cc: freebsd-geom@freebsd.org
Subject: Re: glabel for ufs: size check is overzealous?
X-BeenThere: freebsd-geom@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: GEOM-specific discussions and implementations
	<freebsd-geom.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-geom>,
	<mailto:freebsd-geom-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-geom>
List-Post: <mailto:freebsd-geom@freebsd.org>
List-Help: <mailto:freebsd-geom-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-geom>,
	<mailto:freebsd-geom-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Apr 2009 07:59:52 -0000


--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 21, 2009 at 04:29:05PM +0300, Andriy Gapon wrote:
>=20
> glabel insists that for UFS2 the following must hold true:
> pp->mediasize / fs->fs_fsize =3D=3D fs->fs_size
>=20
> But in reality it doesn't have to be this way, there can be valid reasons=
 to make
> filesystem smaller than available raw media size.
>=20
> I understand that this is a good sanity check, but maybe there are other =
ways to
> extra-check that we see a proper superblock, without imposing the limitat=
ion in
> question.

This check is there is case you have few GEOM providers that start at
the same disk offset, but have different sizes.

For example ad0s1, ad0s1a, mirror/foo, mirror/foo.journal all might
start exactly at the same offset and glabel would have hard time to
figure out on top of which to place glabel provider.

Having file system smaller than provider size is perfectly valid, but
this is about choosing lesser evil, that's all. It is just much more
common to have file system using entire provider size.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--0F1p//8PRICkK4MW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFJ7s59ForvXbEpPzQRAphCAJ9GApq7KwbhGArkf4xLMJjeSDlgwQCgsoE6
/jHijD5u4PadlvTwiDU1TJI=
=ZsMN
-----END PGP SIGNATURE-----

--0F1p//8PRICkK4MW--