Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2009 18:18:47 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-geom@freebsd.org
Cc:        freebsd-fs@freebsd.org
Subject:   Re: glabel for ufs: size check is overzealous?
Message-ID:  <gskrld$vo0$1@ger.gmane.org>
In-Reply-To: <49EDCA21.70908@icyb.net.ua>
References:  <49EDCA21.70908@icyb.net.ua>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gskrld$vo0$1>