From nobody Sun Jun 14 02:10:33 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 4gdGtd56Hvz6h8nd for ; Sun, 14 Jun 2026 02:10:33 +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 4gdGtd3xcpz3K6p for ; Sun, 14 Jun 2026 02:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781403033; 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=kjFX71TjdfvWp0/2wZiN2NBn3FXR36cqS5h5eEiQCQQ=; b=ydmoeufD/D5KZmXz4dJL/G212d3FOpMXNHfif8Bst/e/dzcTLEsBLyKRqPmBTMbuTqDfmv 4HQ9hbp4XBGWja7iYHua24w+rVaR7SYgAnBWzeVGrqxRU3TDTVCrSr16crpIWxSaq3eKSN p0Ilk+JYkvV5ZQEvTCsbqfpzU9zaXp0XHfdBUw3A9LVBFPjb2xS5P7Vcti7WHKwzBgZ8+R CgMBU4tDoJOH8SZocUarr7p8loZbio0uNsDx92T6dmo7NeSzZk78KznivLch0eW/lnIh+F Mjqbzse9z98blIStOOnruydK1JLAwXOWGgjioQtZEYF90HCPVat18CNMPzBy5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781403033; a=rsa-sha256; cv=none; b=U1ZlAOYJ1g76VcN7Z+MZLLSFfNGKtANTqieEb2HJHBBEu1aYqMdGSScOCT+oarX0Htosfp VFAhLlm48Cyqm2ZCSHWlEstPBr9PWW4UXGuOqxtRUgBNujNopdnJIciL5sm2QzmKeRUXej O6+8yquKRL8teF1n38xg2it50bgMxuaejDTzx9xphDKInKWljUcVzScVV2XhnS4fumgdUg 3lXYy+fht4aByCBm8+n72NLdwXzGYBfn3tTvksSEC4SdPjNSSHhTaQqJkF/X1f4nPNxAKD zAXIgGWdHy80uZbbyVH9N7pkEthTa4+mCdWPw1e2D/pkB9Ga8BVwh5Z2LUZAIQ== 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=1781403033; 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=kjFX71TjdfvWp0/2wZiN2NBn3FXR36cqS5h5eEiQCQQ=; b=GUR+/8+pt15LqAaC8RPPo8aAoN1YrIOzgIPiVnvpQf1hxMJA+BhVGYAl9axKEUL9hcx35z W3NB8S6oQtHV71JTgoHeDaeBb6yddrRGDP2mR0idklrAp3o2uEWLscbRSh3zv7P+cGLvlH GQhgXZfM00MClpz47dwfK1Gjr3YL7K4BQdyDkNhKNk/u2X+C4RbW0h78NO4Xb9QyzcJCej JvQ+6oYKB5OIwyDrSORXx5Wz4PlRwXsa93wR9/wk31EaGBGrKFJuD9uFKYqKs5CqVKTqC8 9MPnYagvCeXQgDsVlRYvgJ4KBvfa/4/jnmYdj18hg2jTPZahfjyJBefganYn5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gdGtd2wBnzpQk for ; Sun, 14 Jun 2026 02:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31088 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Jun 2026 02:10:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: da6aa0648c02 - main - struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da6aa0648c0265d6f7bcba44a26f13ed0453dd7a Auto-Submitted: auto-generated Date: Sun, 14 Jun 2026 02:10:33 +0000 Message-Id: <6a2e0d99.31088.3efc2315@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=da6aa0648c0265d6f7bcba44a26f13ed0453dd7a commit da6aa0648c0265d6f7bcba44a26f13ed0453dd7a Author: Konstantin Belousov AuthorDate: 2026-04-26 02:31:50 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-14 02:02:38 +0000 struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state Use the avaliable space to introduce vnode-locked flag v_v2flag. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56912 --- sys/sys/rangelock.h | 4 ++++ sys/sys/vnode.h | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/sys/rangelock.h b/sys/sys/rangelock.h index ea3d0c26cd30..af0a2c3d72b1 100644 --- a/sys/sys/rangelock.h +++ b/sys/sys/rangelock.h @@ -46,6 +46,10 @@ struct rl_q_entry; * all existing lock owners are compatible with the request. Two lock * owners are compatible if their ranges do not overlap, or both * owners are for read. + * + * The resvX fields are there due to padding and explicitly enumerated + * so they can be used by consumers. For instance, struct vnode uses + * resv1 as v_type and resv2 as v_state. */ struct rangelock { uintptr_t head; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 99e90aa4187e..51def7a861ec 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -133,8 +133,7 @@ struct vnode { * Fields which define the identity of the vnode. These fields are * owned by the filesystem (XXX: and vgone() ?) */ - __enum_uint8(vtype) v_type; /* u vnode type */ - __enum_uint8(vstate) v_state; /* u vnode state */ + short v_v2flag; /* v frequently read flag */ short v_irflag; /* i frequently read flags */ seqc_t v_seqc; /* i modification count */ uint32_t v_nchash; /* u namecache hash */ @@ -203,6 +202,12 @@ struct vnode { (negative) text users */ int v_seqc_users; /* i modifications pending */ }; +/* + __enum_uint8(vtype) v_type; + __enum_uint8(vstate) v_state; +*/ +#define v_type v_rl.resv1 /* u vnode type */ +#define v_state v_rl.resv2 /* u vnode state */ #define VN_ISDEV(vp) VTYPE_ISDEV((vp)->v_type) @@ -237,6 +242,7 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); * VI flags are protected by interlock and live in v_iflag * VIRF flags are protected by interlock and live in v_irflag * VV flags are protected by the vnode lock and live in v_vflag + * V2 flags are protected by the vnode lock and live in v_v2flag * * VIRF_DOOMED is doubly protected by the interlock and vnode lock. Both * are required for writing but the status may be checked with either.