From nobody Wed Feb 16 01:14:39 2022 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 4779F19C1B50; Wed, 16 Feb 2022 01:14:40 +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 4Jz0Nv3qrZz4bhN; Wed, 16 Feb 2022 01:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644974079; 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=u39ZhowZy/hA4brf5KqMe0hrBg4jzSCvavQEYoR6/JM=; b=mhVCaNkiVtBchbPig73Fr6rk8GIGJtgPcNKQYKzxBMW9r+HstjAwGdrDoMiRD5WmaHD5Jw r0FmlyhO2m0AvaW+WMQos+WFf5u1f+/1VX1OtMPpaVFyOzS9wrp0nn23zbKIxL6lsfRyjO zI4Q8ydsuizX6knoNFXtVSE5kBkg+EcF4zcVLOguAZvKuPDjNWdZrIdhg1bgnsAj77vl2u bTJpb+s9x/Iaib8iWuVPdrfhwiQ6GeD8cP0iCdS9nNe/pooYPd7yAZrdDt+Uwoz0f5gxsY vKoQ6JhFAo0S0oDOJ/ILu/9AV2RIR2xwQ4OQp351jbgbYwBA81YtuMRRo6KL6g== 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 501D24F4E; Wed, 16 Feb 2022 01:14:39 +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 21G1EdS8011133; Wed, 16 Feb 2022 01:14:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21G1Ed7t011132; Wed, 16 Feb 2022 01:14:39 GMT (envelope-from git) Date: Wed, 16 Feb 2022 01:14:39 GMT Message-Id: <202202160114.21G1Ed7t011132@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: 166926a3dee0 - stable/13 - Have fsck_ffs(8) properly correct superblock check-hash failures. 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/13 X-Git-Reftype: branch X-Git-Commit: 166926a3dee05875b9cb38356871d9ce07083c0d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644974079; 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=u39ZhowZy/hA4brf5KqMe0hrBg4jzSCvavQEYoR6/JM=; b=k7iysLD1HIO9ngBIOOjvlERiCg+qm+qBJPpLc/VHbRWJVn9DH8ma5aXFZd9rtv6ecnMVTq D7L2ypxr0FXxoYQcyfg4xl5BqDhXzid9nMyUp2Jk9imdiSd4Dp01/Qy+lx/n7dd96wplqR o9p3aph53pMzeXn3oXLGBJolfPulEYRDTQf1C9hRRQWIZL23Dhm9cMz5EQT+kShADXzFLG Qh2I6CNXXzMS30wzyz6rlTGwpqqdWhZdAkGpP+xgfKFbVM062q6lwxvXUcfmqLZRnc44QP RmoMD/0jBVj/MCqrtFH6baIy/6giP6rZdd0TPNmBqhxKKIOfw1PVRMJluLgIUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644974079; a=rsa-sha256; cv=none; b=G2ZzkjxoC8j2jaZma3b4mFSsulD2sn7npYAPyb9DUj+5iF7I0kMTlT6v7qqf49GX4i/UzM mO2hWvNPYNkqXRYIAzl4zjIBwY4tO63mQ9Kz0+f0kAGkJbHn22ZC4QYvJKrStVXq0T0fZJ tywuZnZRMKhefwsb19ZxqkHqvsUnk2SoFV+iD6m+IpbQcQiwiNiy5OUrt9QPkyrY8Le8x4 oTM46AFMSlnIkPhP5YW0sg2YcUPzUnybPqZ7uSgQ0ah0Gl4S7QS09fwmoLZ26IkSqFEF2q drtEyDCGQsAJZJBEHDF6uPz9XKVjmbt0qw5Nl3t3QO0E/xhsSTenDuHyIH/hOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=166926a3dee05875b9cb38356871d9ce07083c0d commit 166926a3dee05875b9cb38356871d9ce07083c0d Author: Kirk McKusick AuthorDate: 2022-02-16 01:09:07 +0000 Commit: Kirk McKusick CommitDate: 2022-02-16 01:14:22 +0000 Have fsck_ffs(8) properly correct superblock check-hash failures. cherry pick cleanups from commit c0bfa109b942659f609b7e2bf3ba042ec0cb3f9d PR: 245916 --- sbin/fsck_ffs/main.c | 2 +- sbin/fsck_ffs/setup.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index f7224b48a9a4..7c16f9c9737d 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -588,7 +588,7 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) struct iovec *iov; char errmsg[255]; int iovlen; - long size; + size_t size; /* Get the mount point information of the file system */ if (mntp == NULL) { diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 506a027f40ac..87676e8ca7ce 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -221,14 +221,14 @@ readsb(int listerr) struct fs *fs; super = bflag ? bflag * dev_bsize : - sbhashfailed ? STDSB_NOHASHFAIL_NOMSG : STDSB_NOMSG; + sbhashfailed ? STDSB_NOHASHFAIL : STDSB; readcnt[sblk.b_type]++; while ((ret = sbget(fsreadfd, &fs, super)) != 0) { switch (ret) { case EINTEGRITY: - if (bflag || super == STDSB_NOHASHFAIL_NOMSG) + if (bflag || super == STDSB_NOHASHFAIL) return (0); - super = STDSB_NOHASHFAIL_NOMSG; + super = STDSB_NOHASHFAIL; sbhashfailed = 1; continue; case ENOENT: