From nobody Fri Mar 22 18:43:14 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 4V1WRl14FLz5F4gK; Fri, 22 Mar 2024 18:43:15 +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 4V1WRl0HbVz4sF0; Fri, 22 Mar 2024 18:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711132995; 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=Rm9YPEMLFUuygOzbxBYedEH2ZUt5t+TxGk25XF19ByU=; b=hi9y2kI6CgYpPNjHEzKBy+Xqos8Rq6R5vRKrp/OiW9VC7zswSvjMdJgJg5vxfvuLdWD1R5 EE/pmdYN/4XGGFZ3VGkmCVYH/XiBKvHuNURz7GjdoIZPpvH+2PTNGCagjkNW5WZPwici0F R8+kwtk/f9w1oBzo+Ysm0AV+TCSWtpbdE9tqpA3BpxvvS0BjPT4MBTgOXdZoPxX2eS3Mqa S7RVrAm3bb9hLFYqI3rvMdzI8/Y1WbaHGf32Z4gDNxbFsdbvHJ7UPBgVz8xVO0iZCkiBdK w+gBFsZ1M0I05/1t4uXod9uckJvT+6zMhy/OMrO6lgnEdEMlOYhQRujcZMnu3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711132995; a=rsa-sha256; cv=none; b=bxmyZHLblvdpZHXHXRSGilW1Qv8ZOZDs6L19+uEuNuamzlJTLcjpsV4Effkbad5sOh4fRZ f3HED4GMZMCJE9N1af+qt3kYGghGVhVweZIpTceyo1UxjCyR1cyqOYgB54d/sv+XKjlpdd ff6wY4iv61EIDVKYFRrowLiPZzT4JbsEDqdD4A2AUlQ6mTjTnGngfkJOFC8bLYqIjuicy7 zVjpUAQAlOeyan+ZkGY6ui+cqPexDF1658dRAHr1Q3xjLyw6m/72zCzSJaUmrQPq70leXZ Lg19mJUqmnijIIOLU2+dChVtrT9GP0MF2X2tK7zgRyI31xlQthPW4JsqSSkLmQ== 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=1711132995; 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=Rm9YPEMLFUuygOzbxBYedEH2ZUt5t+TxGk25XF19ByU=; b=mteSWowGjAocBPJxbnmoKK7eWqV3LAoo77Ud9Q7soE/NBvb4/OjrMbVG4GyjJ6GtFVCdeS 8u4HMfS16EEZRQHi7TeuKORsLEwTI7KgoHSXHldgjawufto2JfmyIt9+SDmp2asfSY8MH0 RhpUn/xJaK5ObCgYZNalUcWgsK340BM2z3eRQm6prqcNgpLNCYd8LHIIHLtgP7EAnv8ksx bfKWJppgqlN9pgjB0wvvgp5VvTz1RfdK8jwxTE1CqpWlPWuvGxbz9LcPexUNCsZfkh8VwS lh3Xzwmrlh2KBurAFMJcmAaKt6w4z4r+4Pl0ED5W/FKrpHYHEcVeOS8mNs9hZg== 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 4V1WRk70kxzFsX; Fri, 22 Mar 2024 18:43:14 +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 42MIhEvV029339; Fri, 22 Mar 2024 18:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42MIhEKt029336; Fri, 22 Mar 2024 18:43:14 GMT (envelope-from git) Date: Fri, 22 Mar 2024 18:43:14 GMT Message-Id: <202403221843.42MIhEKt029336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8e402178193f - stable/14 - makefs: warn that ffs sectorsize other than 512 may not work 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e402178193f7b273a956b864d8d8b288ce62ee7 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8e402178193f7b273a956b864d8d8b288ce62ee7 commit 8e402178193f7b273a956b864d8d8b288ce62ee7 Author: Ed Maste AuthorDate: 2024-01-25 01:47:36 +0000 Commit: Ed Maste CommitDate: 2024-03-22 18:42:59 +0000 makefs: warn that ffs sectorsize other than 512 may not work newfs always sets sectorsize to DEV_BSIZE (512) and derives some other values based on the number of 512-byte sectors per real sector. Similar logic is required in makefs. Until that happens, emit a warning that the image may be incorrect. PR: 276571 (cherry picked from commit 176b9e0d724b4c1a24d2c46a1256381784f04edc) --- usr.sbin/makefs/ffs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 597379cc1a4c..97c1d6ccefda 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -340,6 +340,9 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts) /* set FFS defaults */ if (fsopts->sectorsize == -1) fsopts->sectorsize = DFL_SECSIZE; + if (fsopts->sectorsize != DFL_SECSIZE) + warnx("sectorsize %d may produce nonfunctional image", + fsopts->sectorsize); if (ffs_opts->fsize == -1) ffs_opts->fsize = MAX(DFL_FRAGSIZE, fsopts->sectorsize); if (ffs_opts->bsize == -1)