From nobody Thu Mar 23 20:05:24 2023 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 4PjGY04qkkz41lB9; Thu, 23 Mar 2023 20:05:24 +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 4PjGY04G8Mz40KP; Thu, 23 Mar 2023 20:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679601924; 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=pOIR2/Ahw0YpduzGSWBl6gnfI6vpGSJnxck/BV2o0U8=; b=Fvl92d3XcdT3BLU0tZZdCc2CGxATJNYYRp2OmBWcSim7MeOzk6QcNu1Z10NP0bNBBl6W/B J+GtrKuyTbp+1a+mm6rr8UUu+Bp+j8U27jrB7Q4bCmzZucoX8i2zia+I/E50GclIi/Es1i d9yDwfAjDf1RkZ6KNyppHMLu/9Tdvc9u/lDvvhEHD0rsvc/BaJ1eY+cd/we30S/3xDGwvm scyAgFTg2EtQa5pOTLILV01TDM8IiaUyRL/apCqEV6nsFEVf6wSkBpM7H1nBqQQuF6pVJ8 RP/yjTuNjeKJ/zh4tRTjagw9JkaokGO7AKcrG4pZbjDCYgT7Lkg5ngOQC9kyvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679601924; 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=pOIR2/Ahw0YpduzGSWBl6gnfI6vpGSJnxck/BV2o0U8=; b=FmEdjqxE0gQdyff9QTrlnnm0cVgO+CF96LjJgIXv+UoQpH2Zuq/TVEdCmgY6ddOKkRkoq9 SEfSWHG8g1KRPPvjwrlqjzMVp358DT94aq17944v2aZBQNXfti3LJBpExCJcHkIaktYc64 cN0+YuIf5bp72iUJNN8p1ckNeDcmJVN5YfppwEjAlSvDPkQmuusmr8Nv/r7Z8bCuFQhQzZ tp3XCp09OBGJ+1NCsO4JkCKkakme970XsRyKb93xGMRkwFNOOAIL4mcxkbTntnepIIMRZg MBldeObyWtj0MPGt1wZH3Lf0mohoEgY8f3VRQS8kM0E+vXnXeLZ5zjRTDEKQag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679601924; a=rsa-sha256; cv=none; b=xuNX+bYkWFfqBr3KhRG3QWzOFtMd0y+9vS4rQ5dAyrkgBVIC6MzZkQPYyoKGQhIrNkE7Nb Gfg3DUgbPum2IQtx90bE+ZGayY7Dyvo4oWph7gQP6JHMAQQMILkRdHlVTUpLKDTkiQiDcF Ic3hr7mfXj04CFooO0mqLMSavkHtH1+4IbYAO21YlonewN60E6ksY5OqgSizbIj2aclz+Q IWWnrRJotspwkkr7zVG/z6GudAJm/XhPdjhBt5VdnloEqWkylA8c3KSB3/fmpZjoYdJIZe rv9g0Nk8nsZjc6adkQ0nHHRd3hfNjgoJn+QTMoKZL9eXPctuTwXErgpJSIsjUQ== 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 4PjGY03MFnzq2n; Thu, 23 Mar 2023 20:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32NK5Ov4037780; Thu, 23 Mar 2023 20:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32NK5OaG037779; Thu, 23 Mar 2023 20:05:24 GMT (envelope-from git) Date: Thu, 23 Mar 2023 20:05:24 GMT Message-Id: <202303232005.32NK5OaG037779@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: 42c82aad327d - main - Improve chance of finding an alternate superblock in sbsearch(3). 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: 42c82aad327d28cddba70ccd86986a5e5910ca0d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=42c82aad327d28cddba70ccd86986a5e5910ca0d commit 42c82aad327d28cddba70ccd86986a5e5910ca0d Author: Kirk McKusick AuthorDate: 2023-03-23 20:03:20 +0000 Commit: Kirk McKusick CommitDate: 2023-03-23 20:04:52 +0000 Improve chance of finding an alternate superblock in sbsearch(3). When requesting a superblock read for the sole purpose of getting the parameters needed to find if backup parameters have been stored, specify UFS_NOCSUM as only the base superblock is needed. This change reduces the number of checks that the superblock must pass. MFC after: 1 week --- sys/ufs/ffs/ffs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 1d4d98fcb67d..ba1d8c5c13c9 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -682,7 +682,7 @@ ffs_sbsearch(void *devfd, struct fs **fsp, int reqflags, */ if (msg) printf("Attempted recovery for standard superblock: failed\n"); - flags = UFS_FSRONLY | UFS_NOHASHFAIL | UFS_NOMSG; + flags = UFS_FSRONLY | UFS_NOHASHFAIL | UFS_NOCSUM | UFS_NOMSG; if (ffs_sbget(devfd, &protofs, UFS_STDSB, flags, filltype, readfunc) == 0) { if (msg)