From nobody Fri Jan 26 22:28:54 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 4TMC5z10vJz58yP3; Fri, 26 Jan 2024 22:28:55 +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 4TMC5z0Vsgz4gx8; Fri, 26 Jan 2024 22:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706308135; 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=TjsbWcrXfTkcupMAtVluHuxgM9J4pD0OKYm2C5rvRu8=; b=Q2VSO1PW72c0RgyBqRA+gDtATI6K5f2VDe5t73uRI3RvgXgO5+JxmprgujjuIMiQNuqIBV VKBWZ3BNVQ+IFDdbh9friQwTjtLo4/9+VBdw8T4FWXMab97HE3G/asl7gJqYgpO2Uy+hQf r1Y6CpBoUWkXzbLjiQlZSYyLiP/sqlVwE/xTm1FwovnWHxkHJt3/y7AzwbCHf9tR/2WtSY ura4rnkoFaZ9z87lAuOYVSBc/l/k4aVJs3ce9fMaHeUSwxebnCbE5zny6PoNH3CeyNeJD4 ty7eYaSXCH9SrTLWy/q9U3ycyUCk2xH2I/kKbB9xf1AbcYbd7qsBa8R6TrDxbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706308135; 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=TjsbWcrXfTkcupMAtVluHuxgM9J4pD0OKYm2C5rvRu8=; b=Irm7hSUz5WTeiLMdFguzhzhVY4uQB+d0E4L8kyJ/MR/eRihMd+6diTfSymjVPM9GO4ati6 rek4zjZ7gygt3iaWlLCLzKf+44MaPE39WcPN6xRSOqEX+LL8J4wHm2VHpu71mFvZ8LODmJ og1IEV9gnY80ihI6ZEvnSv6t336jlw4b2VNjskksd4zLjP+tJqi/GWMuIK/ZKZ3Kzbs9jD B2YTN8+v9S+BG3CliX/L0uJe3saUPA8DaWEsH/ApZZC3rrdfy2/WWGmpPD54wR/X+2JloQ JQ84a/OY5ozpwaDLdaAjHFcUFYo1AwaunCkGbg1Wy7pVxeexuNUHCv7/pxHL3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706308135; a=rsa-sha256; cv=none; b=KLHch3PyW3OVA4dY33L+S3DuVEAVGOVVsGH5PE6/D9aTC3R2fHJui/Ay6Td3NGKmPmlyDz oXAWt7xZda1DmOofNmK0qbsl+KnneSCrFNL25DAfb9itUHTlhjyOUftcKz4H+t9oqUvRH3 eKPDDfdxnf8LX3rMPrE4GQGFhrMAgpRvi4oVlGtyEhtTVXagWfM3qKWVcLzyF5+xXryA67 fM5NeLnRbz0YQLeQcAXsK8/GhhYOSZzrQCwAUwnVyiY0dvlB0WrZymy3/NpVNAg0iPq64O /B55O6j/BZkGjWNlapMrmVlUIiAcx/zR5Vpm5QY34Rmz4qsw+ZXFOyFtza+6Cg== 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 4TMC5y6gySz10NX; Fri, 26 Jan 2024 22:28:54 +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 40QMSsqw019312; Fri, 26 Jan 2024 22:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QMSsAu019309; Fri, 26 Jan 2024 22:28:54 GMT (envelope-from git) Date: Fri, 26 Jan 2024 22:28:54 GMT Message-Id: <202401262228.40QMSsAu019309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 176b9e0d724b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 176b9e0d724b4c1a24d2c46a1256381784f04edc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=176b9e0d724b4c1a24d2c46a1256381784f04edc commit 176b9e0d724b4c1a24d2c46a1256381784f04edc Author: Ed Maste AuthorDate: 2024-01-25 01:47:36 +0000 Commit: Ed Maste CommitDate: 2024-01-26 22:27:57 +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 --- 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 93dc2e3cd2f5..ebfda7f929e4 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -338,6 +338,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)