From nobody Fri Mar 22 19:03:57 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 4V1Wvd2mKsz5F6lQ; Fri, 22 Mar 2024 19:03:57 +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 4V1Wvd2DdSz3xRF; Fri, 22 Mar 2024 19:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711134237; 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=R08ZrKeDjt6zwzCusguKf+2DtIgHFR501IY7TV3xui0=; b=vgglr9d2Iz1xTAh4+tbxkiuj7/MZtpc1fK+jCTxRIOEWad7HBVkjTar39mK7nqajp91xlh dx7YmE4JjW0l40F0FPsN53wlywmv4n7pP8E15KzPKwAWbw3i2lQUCVIGEuNvP26eLmvtjh o2lDbZsne979/Dv4vIGFq897h6Ca2AnwOrQw+aR4Dlfih/81lYL7eSryKQdIYcnGvcP50G jJZmhSuE2WLCKx7ySBjTSqLxk9c1cemn/sZrenUyLylWj/tzgxjZw4b5djWB2uM++Y3Aip FZlRjD5rCd8MTCe8drNN3dpVJ7LmKZNCxCyU5AH/RIzEgwGxxSjYIXlGVtZAJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711134237; a=rsa-sha256; cv=none; b=b4edIzKHwBxrwx6WS7U20b3ievknMyCyT5zU2dA6OdCxzDKfjpO71L7Q4snr2EzhQcyMsc y+L76TSbcd+tg0mQ+DCznH0Rua3EcCd5Jhjag57ONZTzAlSxeGcZFMuY4iQUvxdi5u7Gsk UMhFbvXde4aX9Dk7LUcX3iWEkhn9Vwq/b0HbJWmp/TWyX1GpCsCXOJYK4YYX07FhFpXJof 4WjUS/Pxh7f4d5iPjQH1YY1EWrvEJYWZK00lWlDkhJv8m75QUuAjWhgIJqHnS0t4IiKnrZ fKE7+yiQFmglVBGa2Z1GDwc6U3TFJBU88x4b/Tna/16kbSO/6VkekwRzOVfpfg== 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=1711134237; 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=R08ZrKeDjt6zwzCusguKf+2DtIgHFR501IY7TV3xui0=; b=vlbKk6lorL7fRbo5qECR8DhrxU7Op8eG8zETYWhwF75s7DVYOS8TIkXDumjJJ0LORNOmaF ITTwx6T3r05fTYVhjQuL2ntd2uB6fmbgariXqB6/z+0uaAWKpc+J92GzKJVO/0qCz+YjJZ cDUR4UieLpI9QHaAp18huxL4ioa5FGWrpBLeo5s0ee3leiaxu6v9scnFPjVBUJzQmPISYZ bLalMGmdH9Iu1rJRH4ytbNcFBwSBUoYZCHgMHyzAQ0cJDEXwCEvM9v2aRtRGgWDT2IuUvF yqoneB4+VPk/s/t/ljccowFkZJKUd1qbpd9+aylI8riOaw6+xaIlxTQU8i8gFg== 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 4V1Wvd1r2XzGSj; Fri, 22 Mar 2024 19:03:57 +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 42MJ3v1j064428; Fri, 22 Mar 2024 19:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42MJ3vGI064425; Fri, 22 Mar 2024 19:03:57 GMT (envelope-from git) Date: Fri, 22 Mar 2024 19:03:57 GMT Message-Id: <202403221903.42MJ3vGI064425@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: 0459337491cd - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 0459337491cdfdd752507c0d2722999a6a9781ef Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0459337491cdfdd752507c0d2722999a6a9781ef commit 0459337491cdfdd752507c0d2722999a6a9781ef Author: Ed Maste AuthorDate: 2024-01-25 01:47:36 +0000 Commit: Ed Maste CommitDate: 2024-03-22 19:03:48 +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) (cherry picked from commit 8e402178193f7b273a956b864d8d8b288ce62ee7) --- 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 7504d6653180..cc83f2f2d3d2 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)