Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2012 17:47:53 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andrey Zonov <andrey@zonov.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: remove check for SUJ_MAX from fsck_ffs(8)
Message-ID:  <20120801144753.GL2676@deviant.kiev.zoral.com.ua>
In-Reply-To: <501939F8.7070006@zonov.org>
References:  <501939F8.7070006@zonov.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--gj73W9rg/nxJHvOF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 01, 2012 at 06:15:20PM +0400, Andrey Zonov wrote:
> Hi,
>=20
> It's possible to set any size for SU journal not less than 4Mb with=20
> tunefs(8), but fsck_ffs(8) reports that it could not check such FS=20
> because "Invalid size".  It seems that fsck_ffs should not check maximum=
=20
> size of journal.
>=20
> I suggest that patch:
>=20
> Index: sbin/fsck_ffs/suj.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- sbin/fsck_ffs/suj.c	(revision 238945)
> +++ sbin/fsck_ffs/suj.c	(working copy)
> @@ -2383,7 +2383,7 @@ suj_verifyino(union dinode *ip)
>  		return (-1);
>  	}
>=20
> -	if (DIP(ip, di_size) < SUJ_MIN || DIP(ip, di_size) > SUJ_MAX) {
> +	if (DIP(ip, di_size) < SUJ_MIN) {
>  		printf("Invalid size %jd for journal inode %d\n",
>  		    DIP(ip, di_size), sujino);
>  		return (-1);
>=20
> What do you think?
It seems to be right. SUJ_MAX enforcement is only in place if user did
not supplied desired journal size, and there it is used to provide some
sane defaults, not due to the operational limits.

More important is that ffs_softdep.c:journal_mount(), only the check for
the minimal journal size is executed.

I will commit your change in several days unless really good reason would
be found not to apply it.

Thanks.

--gj73W9rg/nxJHvOF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlAZQZkACgkQC3+MBN1Mb4gjiACfZGOyEMvCRSI4Zy8hSOwg21lE
/LQAnRmHQipZKwNUowfnF1ZVjnWU+ZYl
=gaM0
-----END PGP SIGNATURE-----

--gj73W9rg/nxJHvOF--



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