From nobody Tue Feb 20 00:17:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tf0NL6HWvz59pXk; Tue, 20 Feb 2024 00:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tf0NL5nNjz4kVd; Tue, 20 Feb 2024 00:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708388258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTmOC4Xk2H5b4v1lPcZiujSTXRfvSQxSdJb/+r0CxhQ=; b=b/3FFRuwfPiGVUGlWbtusw98PeP1BOsQRrAyRrQB8IBsGmTOnBRADqnjSmPFaHO05ukgbl l+kM0B6M3PMZ0XccIzqXpRkEPsj/cmUkl/J6UF9wzNvdtfzjeyFAm+oEKz5twFKjsqwr31 HSxyIiYHfbqn8dzyBwYZDkOon+vKNv3KJd3Gd8C/YyvTqQ6yGO1MGz43MG1RjJ53w8Grz+ p1xjSCJ2iAFLx8mpN9+4oewOQvuwOC59sokZUXenWzpahF//z1vOPw59x3I4v0liiffD5v w1wewfHBc3Zvl24GFeVNezVmjfm6y/XcG7o1ZEc/3HpXf8Psvzco6JGg165Zlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708388258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTmOC4Xk2H5b4v1lPcZiujSTXRfvSQxSdJb/+r0CxhQ=; b=w0a0CY+Y17UZL0ppHofoTnIvtcl2gqqopK/2FF0lscIPevv0MaaUJ+Q7gvr7dsgP7a4aLO 4XVb6xJ0r/27hc/4DQOGz886SeEAoJwaNw3qRGhWx3TfMT+kZV9JxTcVZYp+6T7+LxFZnQ svUxWU5SOdOBYCwuFEZyHC5wtsTTbxNca74zQt+OLXPglLeApiWNmmWCIVp4sm3KdOL2S5 MRG6bsgo78ryKT5Bmcaq8bFVcSUSzWQNLEzPmON7hC8nxcbaJzR8c9Lrl7x6Zo+rod+JcP Amn6Xs5Xl6q/vUJvHuEgxPwn/JZHDvy8QzeKiGS/jmeE4DGTlHTdWqy6SzA1Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708388258; a=rsa-sha256; cv=none; b=bSK3s2fpRXU7tuEVzOoou5aEIXz7Z0wYKo42KJj/Kls702xDahjYsa2nkYOAUhCtIHBWm4 h0wLGFAElUiLojsfpnxn5vTzTUlNl37opVTAMZTRAd00iCG0/5CcBV93GEvDHzdATzs3Si jN+EErGLF1trI4VbVZlOTTg6eVN6dutknymIWLIcDGCy/QBJ+y4wG/RFsqnC/5VlIh5lWu //TuV9qLE221lORq4HaRkIcvGLRJV2qzZSTCuinVKKr4RBhkxCOvu5OcbtB4mQpjQp/idG /SiciopLlT0JmmyNSZmtM6oWRCEplyia0e80k5PhpaaPD3dOFwxaRpDZLKtaOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tf0NL4Ldhzwcm; Tue, 20 Feb 2024 00:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41K0HcYX055313; Tue, 20 Feb 2024 00:17:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41K0Hc0H055310; Tue, 20 Feb 2024 00:17:38 GMT (envelope-from git) Date: Tue, 20 Feb 2024 00:17:38 GMT Message-Id: <202402200017.41K0Hc0H055310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: b241767f8ef3 - main - Eliminate unnecessary UFS1 integrity checks. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b241767f8ef38f9ca7c109fe2fccd11ccbfaa4f0 Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=b241767f8ef38f9ca7c109fe2fccd11ccbfaa4f0 commit b241767f8ef38f9ca7c109fe2fccd11ccbfaa4f0 Author: Kirk McKusick AuthorDate: 2024-02-20 00:16:07 +0000 Commit: Kirk McKusick CommitDate: 2024-02-20 00:17:05 +0000 Eliminate unnecessary UFS1 integrity checks. The UFS1 integrity checks added in FreeBSD 14 were too aggressive for UFS1 filesystems created in FreeBSD 4 and 9 systems. This patch removes those tests which can be done safely since they are not relevant to the current implementation of UFS1. This is a follow-on report to bug report 264450 (comments 21-28). Reported by: slb@sonnet.com Tested by: slb@sonnet.com PR: 264450 MFC after: 1 week --- sbin/fsck_ffs/fsutil.c | 2 -- sys/ufs/ffs/ffs_subr.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index aa536fb5dd4e..2acf825b159f 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -1017,7 +1017,6 @@ check_cgmagic(int cg, struct bufarea *cgbp) CHK(cgp->cg_ndblk, >, sblock.fs_fpg, "%jd"); if (sblock.fs_magic == FS_UFS1_MAGIC) { CHK(cgp->cg_old_niblk, !=, sblock.fs_ipg, "%jd"); - CHK(cgp->cg_old_ncyl, >, sblock.fs_old_cpg, "%jd"); } else if (sblock.fs_magic == FS_UFS2_MAGIC) { CHK(cgp->cg_niblk, !=, sblock.fs_ipg, "%jd"); CHK(cgp->cg_initediblk, >, sblock.fs_ipg, "%jd"); @@ -1034,7 +1033,6 @@ check_cgmagic(int cg, struct bufarea *cgbp) } else if (sblock.fs_magic == FS_UFS1_MAGIC) { CHK(cgp->cg_niblk, !=, 0, "%jd"); CHK(cgp->cg_initediblk, !=, 0, "%jd"); - CHK(cgp->cg_old_ncyl, !=, sblock.fs_old_cpg, "%jd"); CHK(cgp->cg_old_niblk, !=, sblock.fs_ipg, "%jd"); CHK(cgp->cg_old_btotoff, !=, start, "%jd"); CHK(cgp->cg_old_boff, !=, cgp->cg_old_btotoff + diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 20addf66a65b..bcb4d25c8ad9 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -395,7 +395,6 @@ validate_sblock(struct fs *fs, int flags) } else if (fs->fs_magic == FS_UFS1_MAGIC) { FCHK(fs->fs_sblockloc, <, 0, %jd); FCHK(fs->fs_sblockloc, >, SBLOCK_UFS1, %jd); - FCHK(fs->fs_old_ncyl, !=, fs->fs_ncg, %jd); } FCHK(fs->fs_frag, <, 1, %jd); FCHK(fs->fs_frag, >, MAXFRAG, %jd); @@ -472,16 +471,13 @@ validate_sblock(struct fs *fs, int flags) WCHK(fs->fs_old_rotdelay, !=, 0, %jd); WCHK(fs->fs_old_rps, !=, 60, %jd); WCHK(fs->fs_old_nspf, !=, fs->fs_fsize / sectorsize, %jd); - FCHK(fs->fs_old_cpg, !=, 1, %jd); WCHK(fs->fs_old_interleave, !=, 1, %jd); WCHK(fs->fs_old_trackskew, !=, 0, %jd); WCHK(fs->fs_old_cpc, !=, 0, %jd); WCHK(fs->fs_old_postblformat, !=, 1, %jd); FCHK(fs->fs_old_nrpos, !=, 1, %jd); - WCHK(fs->fs_old_spc, !=, fs->fs_fpg * fs->fs_old_nspf, %jd); WCHK(fs->fs_old_nsect, !=, fs->fs_old_spc, %jd); WCHK(fs->fs_old_npsect, !=, fs->fs_old_spc, %jd); - FCHK(fs->fs_old_ncyl, !=, fs->fs_ncg, %jd); } else { /* Bad magic number, so assume not a superblock */ return (ENOENT);