From owner-freebsd-geom@FreeBSD.ORG Tue Apr 21 16:19:10 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 894B01065675 for ; Tue, 21 Apr 2009 16:19:10 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id DC6A88FC1E for ; Tue, 21 Apr 2009 16:19:09 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LwIga-0006Ce-H5 for freebsd-geom@freebsd.org; Tue, 21 Apr 2009 16:19:04 +0000 Received: from 93-138-87-150.adsl.net.t-com.hr ([93.138.87.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Apr 2009 16:19:04 +0000 Received: from ivoras by 93-138-87-150.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Apr 2009 16:19:04 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Tue, 21 Apr 2009 18:18:47 +0200 Lines: 44 Message-ID: References: <49EDCA21.70908@icyb.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1534D04771F35996010DF255" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-87-150.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <49EDCA21.70908@icyb.net.ua> X-Enigmail-Version: 0.95.7 Sender: news Cc: freebsd-fs@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 16:19:10 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1534D04771F35996010DF255 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Andriy Gapon wrote: > 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 reaso= ns to make > filesystem smaller than available raw media size. >=20 > I understand that this is a good sanity check, but maybe there are othe= r ways to > extra-check that we see a proper superblock, without imposing the limit= ation in > question. Shouldn't fsck complain of this inconsistency? If it doesn't and the [UF]FS code doesn't, I don't see why glabel should continue to check it. Struct fs has a tonne of int32 fields, some of which are only used for information whose length is a couple of bits - if checking magic isn't enough (and it probably is), there are other fields that can be validated. --------------enig1534D04771F35996010DF255 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknt8egACgkQldnAQVacBcggbACdEj+LuojFWnCWRY6UW04NW8g5 FIEAniH0qLSY5jNOImZRgzJlcXoLW3cZ =DEqd -----END PGP SIGNATURE----- --------------enig1534D04771F35996010DF255--