From owner-freebsd-fs@FreeBSD.ORG Wed Aug 1 14:48:01 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AFFD106564A for ; Wed, 1 Aug 2012 14:48:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A47648FC18 for ; Wed, 1 Aug 2012 14:48:00 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q71Em6B9011383; Wed, 1 Aug 2012 17:48:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q71ElrUa073367; Wed, 1 Aug 2012 17:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q71Elrxa073366; Wed, 1 Aug 2012 17:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Aug 2012 17:47:53 +0300 From: Konstantin Belousov To: Andrey Zonov Message-ID: <20120801144753.GL2676@deviant.kiev.zoral.com.ua> References: <501939F8.7070006@zonov.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gj73W9rg/nxJHvOF" Content-Disposition: inline In-Reply-To: <501939F8.7070006@zonov.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: remove check for SUJ_MAX from fsck_ffs(8) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 14:48:01 -0000 --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--