From nobody Tue May 12 20:06:06 2026 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 4gFSJv54Bwz6d1hS for ; Tue, 12 May 2026 20:06:07 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gFSJt7355z3ZMX for ; Tue, 12 May 2026 20:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778616367; 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=fODo2dzqr2CZSS22/Oo85aDc4fP1K+F6i3qXyXDc0Ic=; b=WPvp7tWUgWrySY5+WpI782Hezl8SE07c6QM3H0AShhqICtl5P8Y+KAbPAcyk9NGrXtsJh8 9gmwAiG8cj+Y7JPLlz2VbM25Fhyfd1mnUX4Y8xm0UJQmgRyBEYSkQVmha0gN7FtHwjGl34 vJljW9gRl+JfNo8rzp9Xwd/zYle2ZpWKxKeh7iTZufblP2z37w51+Ys6NTYdoh/tUfw1xI XcEDbgjEDJhN2fZeseG5F3oQRo9WPKASBdRyZOIvGMzbjUPonMSLFqofMQzzThjavtnQe4 Mr8qj3yrNuAyxpq5zDO4XV2HRD6Lm/Y2zvledV62T89DMQAgElHyT926evU0dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778616367; a=rsa-sha256; cv=none; b=L2Q70+GPRge0WpcpSBUcteVIRT10P6s/B1E/R7Tf+0cn6h2eItytHGDOLwozxnwCmpsQ20 O9O2oLmflhX6qVpnUCMddnKs/t/JzPM0czPHvkauNf8rIp71jMvXqf4EVDioAM6Zoh9H+f iwkya/EC9irv9gmdfZk+fwrEA19sztFbBE3UnQA4ObxLo/RP+8Or3U8Efu7GlmLUChFzIx 8kTt9SsjwZ0XnKHS70v9RmbbLFZKDN5P1JY+7+pjc1WuGByZdF2XV1MASMqw9NLk8RoeDp e+Remd1iI3dlYH0syYvYc7WtacICugsLUgx8JjOkIBGiMPUP5T0Tf1qEe4A1nA== 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=1778616367; 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=fODo2dzqr2CZSS22/Oo85aDc4fP1K+F6i3qXyXDc0Ic=; b=WWoDC5k7zPvh+qK8D+gY98XZWfDAigqCAU7m/VuPtvJsTNp1oCYYaafAqli4VdPIdaWeqc 4MxIKP8FQQpVJwSO5MgR0I7t8m55wd8v7U4ooTECtmlf4g1BtiFITJ8NkariNMDl1SpGdv t4g1fXJUVHRA/uxXc7tYMk8aWmODuDdYL06wkPTetZjLTCX1m+wj4UdP88c+13WrshgL1k kkN3q9QGUbamuoRcWJ5uIknC1cpvk10UfFJkBjLpAsGXV+DFQhAvWxD4luftqosrlPO3+1 cojjR/egYmELVcdPeor6S6gIRZKmcOuSzTq3ygvi3QPZ20b5v/DTZFWFm0wlBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gFSJt6dSsz3Tw for ; Tue, 12 May 2026 20:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22098 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 12 May 2026 20:06:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 271d25a066b5 - main - libufs: Avoid using param.h constants in libufs.h 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 271d25a066b59df1e2bb774990948c985382126a Auto-Submitted: auto-generated Date: Tue, 12 May 2026 20:06:06 +0000 Message-Id: <6a03882e.22098.3032f52d@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=271d25a066b59df1e2bb774990948c985382126a commit 271d25a066b59df1e2bb774990948c985382126a Author: Mark Johnston AuthorDate: 2026-05-12 17:47:17 +0000 Commit: Mark Johnston CommitDate: 2026-05-12 20:05:19 +0000 libufs: Avoid using param.h constants in libufs.h MAXBSIZE is defined in param.h, which defines many other things. To avoid forcing all consumers of libufs.h to include param.h, let's instead redefine it and verify the definition in inode.c. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56859 --- lib/libufs/inode.c | 3 +++ lib/libufs/libufs.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/libufs/inode.c b/lib/libufs/inode.c index 863e71867daa..bc4d99c66203 100644 --- a/lib/libufs/inode.c +++ b/lib/libufs/inode.c @@ -48,6 +48,9 @@ #include +_Static_assert(LIBUFS_MAXBSIZE >= MAXBSIZE, + "LIBUFS_MAXBSIZE must be at least MAXBSIZE"); + int getinode(struct uufsd *disk, union dinodep *dp, ino_t inum) { diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h index bb92e082a875..b76d15b338b4 100644 --- a/lib/libufs/libufs.h +++ b/lib/libufs/libufs.h @@ -29,6 +29,7 @@ #ifndef __LIBUFS_H__ #define __LIBUFS_H__ + #include /* @@ -38,6 +39,8 @@ */ #define LIBUFS_BUFALIGN 128 +#define LIBUFS_MAXBSIZE 65536 + /* * userland ufs disk. */ @@ -48,11 +51,11 @@ struct uufsd { } d_sbunion __aligned(LIBUFS_BUFALIGN); union { struct cg d_cg; /* cylinder group */ - char d_buf[MAXBSIZE]; /* cylinder group storage */ + char d_buf[LIBUFS_MAXBSIZE]; /* cylinder group storage */ } d_cgunion __aligned(LIBUFS_BUFALIGN); union { union dinodep d_ino[1]; /* inode block */ - char d_inos[MAXBSIZE]; /* inode block as buffer */ + char d_inos[LIBUFS_MAXBSIZE]; /* inode block as buffer */ } d_inosunion __aligned(LIBUFS_BUFALIGN); const char *d_name; /* disk name */ const char *d_error; /* human readable disk error */