From nobody Tue Mar 05 00:09:17 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 4TpbXG0wbRz5DYLd; Tue, 5 Mar 2024 00:09:18 +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 4TpbXG0CkXz4Hm5; Tue, 5 Mar 2024 00:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709597358; 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=NOb0ZWQasm8oaZrFVu1QQgE/OoRsC8xDwTZxT3XzHtU=; b=Drj8RqOhrxk/c4ctTqJFjdBisk0AVFyM/6C7qKPlzU96XONt5Ia4kYEDOxuAOeNB+GZXGs sqquKOskCuczwiN5H5JzG6jq2HSu4I6JaqOZdiIOAaF3U6/Bn1K0ZeqW/QdvjARGb19rJo 6cG7f42D9BYzLo1j0iW8YXd7NT6/U5dJE9QT+zJPLBvH2RmDVoVfk0EqMH3TCPGO93T064 N3tFkfqWjzRlSPEuI8KSBrb5S5NjytHFUS478splIv5zy83w6BBrtK/OTR8CtFSs5Mvczl bVHCSEP8oR05c33spBsBFfZ9LS847U9ZlxgkkGYommYse7bR6OsRZUZPz8ktCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709597358; a=rsa-sha256; cv=none; b=x9aj7WOyn9XYsuqdB5DWRTEV/OgEM5df79VWmDsN23sASwwyjU4edc/HfBqYpI40qVceE5 MtYV40awa8VlBW1M8ZbszzzBVIYIWd3tWbgFxupuvjpk68wF3vYoM5R9uEgsAXKMs29H5p X1xTTE+huutSVWjmBWGQ/bDXZTbBu5Iqu6WMHQBrDVnhzSGq/qvvqWrBr4wP9ScG8TjP39 1rMaS+SInZBNYZ37jIXmC3RjtXZQjCtwvimwceupjtOdaZLdLYC7617fSeaywtWwADPyB1 HLhltILcnNdvmJbcBgtx948yr567qyevzdS2go91TEu5GmSCq6scNmCufbmWXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709597358; 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=NOb0ZWQasm8oaZrFVu1QQgE/OoRsC8xDwTZxT3XzHtU=; b=SeVpvi3HNzykypSC2wuP4n+tSffSD2o39dUlk0XRQqiOipItP0CQjRwXXFmeu2U+JcysJh smG1UH5GlKpTQjgVcrNxFGEjX/F/vqFBoSyFTeA4wdGCEtK4R+NMGJtL+4iSGXRmMwD1Z9 /kI4snGGjvnQZJHUmcpl/DEH2EQbe9TCX2DxHcPgFUgyxUiox4zldstQNV2mtdtuFh4w5d Bw03ejrGcZIE9ErugXDuSYMH/E5gs3OWvUuYw7OXsOWOhIKhXeBypD2NkBMUmTZDANNuVN uUfMy+NPHp7QYC+Z4SfmoZ1ltw9kQWcG9i60mb2iP0ZTeWEOjk3r/prv6TCwOg== 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 4TpbXF6wX3zjCw; Tue, 5 Mar 2024 00:09:17 +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 42509HNC038496; Tue, 5 Mar 2024 00:09:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42509HBL038493; Tue, 5 Mar 2024 00:09:17 GMT (envelope-from git) Date: Tue, 5 Mar 2024 00:09:17 GMT Message-Id: <202403050009.42509HBL038493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: fdfb8e783c3e - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: fdfb8e783c3e8606d1294f9772fbd1496994b581 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=fdfb8e783c3e8606d1294f9772fbd1496994b581 commit fdfb8e783c3e8606d1294f9772fbd1496994b581 Author: Kirk McKusick AuthorDate: 2024-02-20 00:16:07 +0000 Commit: Kirk McKusick CommitDate: 2024-03-05 00:09:10 +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 (cherry picked from commit b241767f8ef38f9ca7c109fe2fccd11ccbfaa4f0) --- 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 2583e324e94c..fde1b467bcd3 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -1024,7 +1024,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"); @@ -1041,7 +1040,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 5870416820fa..fc43b4c06e7f 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -398,7 +398,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); @@ -475,16 +474,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);