From nobody Sun Jun 14 02:10:34 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 4gdGtf72bMz6h8r9 for ; Sun, 14 Jun 2026 02:10:34 +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 4gdGtf4Fq6z3K96 for ; Sun, 14 Jun 2026 02:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781403034; 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=wzj5cO2VThja+G/DngTdT0OZVzKWdWPJeWMtbX9Ue6I=; b=anuZLC8iKP/dSPDz/hl1JIs7nhCcs/PXU3gyS9L2XZ06r7I3GJJQGNnBVoKR+Mm3Z9qlg5 sPUwJUCA9/iIIiDh9BGk6TGyjHxanCIUJF8PRjhvR+lxx3NQh/OxrRHMKfx4+yAaYXBOI2 bgnOj89i4k48twp4SYusfWBfh+MefBwTCq/B+/Tlcd0Bx/itJjRndDUGXKMhtP73J89qpd 9VDCB3RSun823sooziZ1KF8yMlRPH9SvrU5qtsLLZomNmWymMIDsHWx0djUIrXJd5on1Mr ldv3q+OKYe9dLKUXDhRkexAhR8BLWPmRpjHNmTQwqlxURpGRCgDUUTx3QwHmzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781403034; a=rsa-sha256; cv=none; b=my99jWPXxaKsdloGfnF5Hdqv1TSzOVjaEzgSPNtn2tRZxzAYxr2YNX8RpT8qrym7UZ3QN3 klZXfeRMxLH5FlBts8otIPQwKgizPYTRknT2GbII0N/ES4lm0JEH7T2B3fm+hAjqze22Xg hS1pS0DfMESYNVEg2VEBVgfS+s1fvgBuEkWNwBOFXHORwj1g3KB2OJB9fVQxS4n+IC2UdQ +Pb90PHM+1g1biFIxiB6DUckDbbsB7gejjrxI4uQpaZ1yZWz5JHENWGva3zQDz1OCz9QMS dQY0XYkQEwUw8Lc1AnKxTfUlmwCq5L6KJn0deqzjbN81EpEJZbhDqo3n7Z/qiQ== 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=1781403034; 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=wzj5cO2VThja+G/DngTdT0OZVzKWdWPJeWMtbX9Ue6I=; b=sKhNtjZcZ8QptK+Sf2Y8u5MtG15YEFyCgDxIdENaTcDel/AKTieSCQHIQqIy58hE1ur+NK oMHL5rzrdXdRhUAQNNjN5RV4I3/XA6mlPHPTRahC1Ii8VjEVVHqIyGisUAqFmnW1grabBB hKKwdUade3GkZhRH3fBzcLcPO9OQ2sGNuSjzOXyMd0Fi+nWfVTQTzKDY6sI6BhNtSlJPC/ LH7l1ekg/sQRbOrrSqp8HUtO4jyrViAKd2jKhTkCnQ+erbtIWv7qgZDfk+SAF7LyUGvbwW 8zL3IpzVNN1nD4l/pJ0Se3l8Nnhil4/FDKtK1ItsNYXglrAVYEqK0UprzxkA+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gdGtf3bKRzp5X for ; Sun, 14 Jun 2026 02:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Jun 2026 02:10:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 64467d2ec3ed - main - vnode: move VIRF_KNOTE to v_v2flag 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: 64467d2ec3ede11430554fea68b317d27bf4b5c3 Auto-Submitted: auto-generated Date: Sun, 14 Jun 2026 02:10:34 +0000 Message-Id: <6a2e0d9a.27d51.bd811b7@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=64467d2ec3ede11430554fea68b317d27bf4b5c3 commit 64467d2ec3ede11430554fea68b317d27bf4b5c3 Author: Konstantin Belousov AuthorDate: 2026-05-09 19:14:56 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-14 02:08:20 +0000 vnode: move VIRF_KNOTE to v_v2flag The semantic of the flag has the natural march to the code scope that is protected by the vnode lock. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56912 --- sys/kern/vfs_subr.c | 5 ++--- sys/sys/mount.h | 4 ++-- sys/sys/vnode.h | 7 ++++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7b2718269a1f..64c11660e211 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6675,7 +6675,7 @@ vfs_knlunlock(void *arg) struct vnode *vp = arg; if (KNLIST_EMPTY(&vp->v_pollinfo->vpi_selinfo.si_note)) - vn_irflag_unset(vp, VIRF_KNOTE); + vp->v_v2flag &= ~V2_KNOTE; VOP_UNLOCK(vp); } @@ -6725,8 +6725,7 @@ vfs_kqfilter(struct vop_kqfilter_args *ap) vhold(vp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); knlist_add(knl, kn, 1); - if ((vn_irflag_read(vp) & VIRF_KNOTE) == 0) - vn_irflag_set(vp, VIRF_KNOTE); + vp->v_v2flag |= V2_KNOTE; VOP_UNLOCK(vp); return (0); diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 2e880bac9068..fa4c98d93bf8 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -967,7 +967,7 @@ VFS_PURGE(struct mount *mp) static inline void VFS_KNOTE_LOCKED(struct vnode *vp, int hint) { - if ((vn_irflag_read(vp) & VIRF_KNOTE) != 0) { + if ((vp->v_v2flag & V2_KNOTE) != 0) { KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, hint, KNF_LISTLOCKED | KNF_NOKQLOCK); } @@ -976,7 +976,7 @@ VFS_KNOTE_LOCKED(struct vnode *vp, int hint) static inline void VFS_KNOTE_UNLOCKED(struct vnode *vp, int hint) { - if ((vn_irflag_read(vp) & VIRF_KNOTE) != 0) { + if ((vp->v_v2flag & V2_KNOTE) != 0) { KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, hint, KNF_NOKQLOCK); } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 51def7a861ec..8077e7741ec3 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -229,7 +229,7 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); #define v_object v_bufobj.bo_object #define VN_KNOTE(vp, b, a) do { \ - if ((vn_irflag_read(vp) & VIRF_KNOTE) != 0) { \ + if ((vp->v_v2flag & V2_KNOTE) != 0) { \ KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, (b), \ (a) | KNF_NOKQLOCK); \ } \ @@ -261,7 +261,8 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); #define VIRF_INOTIFY 0x0080 /* This vnode is being watched */ #define VIRF_INOTIFY_PARENT 0x0100 /* A parent of this vnode may be being watched */ -#define VIRF_KNOTE 0x0200 /* Has knlist */ + +#define V2_KNOTE 0x0001 /* Has knlist */ #define VI_UNUSED0 0x0001 /* unused */ #define VI_MOUNT 0x0002 /* Mount in progress */ @@ -1055,7 +1056,7 @@ void vop_rename_fail(struct vop_rename_args *ap); off_t osize, ooffset, noffset; \ \ osize = ooffset = noffset = 0; \ - if ((vn_irflag_read((ap)->a_vp) & VIRF_KNOTE) != 0) { \ + if (((ap)->a_vp->v_v2flag & V2_KNOTE) != 0) { \ error = VOP_GETATTR((ap)->a_vp, &va, (ap)->a_cred); \ if (error) \ return (error); \