From nobody Tue May 19 14:09:00 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 4gKc3d2s9Mz6fFhN for ; Tue, 19 May 2026 14:09:01 +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 4gKc3c5vKbz3hMy for ; Tue, 19 May 2026 14:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779199740; 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=yclyF+PiSYqCNqxqdTnz1NQWfBCiHWshHWk3E99j3kQ=; b=wIZG8suyaFmoXgcEGE13NZoRAIWeHFsy3zA7gpBZXLKwbqFxUugzckWJEP3DtwnUlo4P1F u/pvMCEyySOgKgAYX7/ptIXc+bGXrIvKIYFn5rChV/xS6wm9cLV04eMng/wCc+8aPlvaN+ PupnsaeShWwg96PHWriI20t2PnNOxPq8kMYFwhYGLkgC74jvyMND2ggaJq41AuwZDkpzdn VCRFPz7w+9ap+u12ii7dFliL3l86rcz6E+kvA5IbDLiD3AH4O+lmDtxDt1XEEdJjtZLPdq sTmmekjspeQIIIhn3KU/3trMqCcBMFKCbdtdKFm7pczqCFRg0ZDikGOzXXY5+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779199740; a=rsa-sha256; cv=none; b=HjW9r0jGOzXO0FSfV/FG38W7zChfwqnBKhgtLh68nm7O0bhV1MxcTMflXViJBmIGbyiEbr 7kqU9kzkChUA1DIK7q/+YuI4FMWOXzZQG4BDsnZ50nllnJPnSrIh6rDa8l6T7xkTtZuo4z mczh9cAuk5hoptlVgZ2wpHZUSHll4dsZgNOJiA9jD8TK5fBODznNceAVM25eIlr/UFan3d D3uC3iXhJYb5O02xtwbIu1sSklTJebVRFR6nUXLdHWRt0FFGx5XYEr5rgnk5fHnMa3GUD3 dyApn4jyijN/Jt2tr0ZfjeNqpwAPLWZUnFX1MQ9vXKFz+d1BHbl4CG+vhww4tw== 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=1779199740; 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=yclyF+PiSYqCNqxqdTnz1NQWfBCiHWshHWk3E99j3kQ=; b=dUa0uJ0MkQzOppU3cF10UOs8oOlivPtNk2fSaBxAbTbuB9j0RSdi4+cXAXUd1L+VPYYKVu YSgQbrFwuPpdwbCXm+AD2lGcUOmI5hO0kNp7PfyXMVGUIUfkpwJVPwLFZWLcNoSmxdnrLL avrKFe9imV0HWs9RuHaKakiNiY16NhOXLNY035l/R9EBydW7vuy+sYARFjcxPtDU0iTJOO pHgAXcxl5twS1vGkfc8DPjf5cGJb001wJtDYRazMTvTyIeFqKRs0cPO11FkBV3vLhQLWOG ofXU9Psd6yCKxrGS6crvgVPpfPh1vqvgDA9UVLgaFjD3id1gdQbNgFdA0m/UdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKc3c5W4Tz3Hd for ; Tue, 19 May 2026 14:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bdca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 14:09:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8e44312642d2 - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 8e44312642d227eda977582e2d61767ddb227991 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 14:09:00 +0000 Message-Id: <6a0c6efc.3bdca.28bf4cfc@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e44312642d227eda977582e2d61767ddb227991 commit 8e44312642d227eda977582e2d61767ddb227991 Author: Mark Johnston AuthorDate: 2026-05-12 17:47:17 +0000 Commit: Mark Johnston CommitDate: 2026-05-19 14:08:33 +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 (cherry picked from commit 271d25a066b59df1e2bb774990948c985382126a) --- 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 */