From nobody Wed Dec 17 22:46:28 2025 X-Original-To: dev-commits-src-main@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 4dWpnK0nGfz6LZl9 for ; Wed, 17 Dec 2025 22:46:29 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWpnJ5Jhlz3VM5 for ; Wed, 17 Dec 2025 22:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011588; 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=B5pEErLzYyrsQhxllT/PRNI5aabUM2IjFRGcP6CyHEg=; b=w1rKWL+t3az/Cp54k+RbKIf6MelcVugoXxOEpZBxpkE24YWE4zCSaZH1jY03EA2193u65Q 7r9CmotIYe41ih5QIs3meWvOPJohFk9mPyb9IpJZfba7TvuQkAWgY9J6sSIn8AtFQYN6US LNhbbRLqLp7Bj0Fj7ujgdF06hdZRpblaecm3596Qlj0YmV2vijphSy54K6bUehtgSSDs9B r7M64tIYZ4BjfwTrXTfuSLPGyzv+hICcVrKQPJjci1fDRf7/zRnETcy47sabQ/vOn9NDZ1 ZHSYsxQ5E6tIHqzIvCfSUNFTqubCFsS9g/1D9Hv0OPOElc9Hb8oTKavUKpyGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011588; 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=B5pEErLzYyrsQhxllT/PRNI5aabUM2IjFRGcP6CyHEg=; b=Y4NdiZGHtr32Sh6yxvo+oqauNse5k5taX8Jfa7f+84bsETCQg6CCoPOxuSfuMLGRtHt0B2 0KA/FRbUpg/llLkQjm4/BFyS8gwm7tH16/JdmM5wcRwMZWZHPB27hLCA3grwiKZxbzuH8r kRp74ttI+t/faMIA4Nbe01ae6hrZ039v3dMkH3dUnVrgdXhkI+9L5EjHqBIJFZppT6rYOT U0gTIzoWSWlHbZigVoDFkg8JccC9hMEAJC7H+TvSVpBVGqmZXdPihqKcifgFODoWxMoySu m9o5bElthbWSqTQzz6gfZni8pdwOvYtj1Q2jPKh9+/zLXtaISNvKKQJg7xpykQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766011588; a=rsa-sha256; cv=none; b=FONy5Cwv8zuFJ5s0fivl4GpsWMiohTcd63DhqnQnEuWbwL8gJCeVAlvLlueb3edfZ44N1e RYlHtKoV6TuxyaLjpPmRu0pid5SJUkVwhe0Co0NAw+LG9roexAz7Xo47rvSdfQBevjORdq EqKls4FkihvNI+hJp4esLPLbBnb8z33Gnj2lDsSro2AYTQib5QtVNV2mBhAIy0uFkHoAiG Mt8K7dVUy5PxA6evHwylzeYv0awE+DyGjnIw4v1z5po/8Wsk2CKz9ohxjc9AWiuN16yPIc jNzPsyYRp8I5OMft8y6M4MGgEMgs2tAx0i0zqQu3u803YOYz38GtNSYbeefpsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWpnJ4NTpz1BLp for ; Wed, 17 Dec 2025 22:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b206 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 22:46:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e64928611b3d - main - unionfs: Sporadic cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e64928611b3d157608d4fb3906b7362ab98c4ad1 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 22:46:28 +0000 Message-Id: <694332c4.b206.2556e4bc@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e64928611b3d157608d4fb3906b7362ab98c4ad1 commit e64928611b3d157608d4fb3906b7362ab98c4ad1 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-14 23:35:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-17 22:46:04 +0000 unionfs: Sporadic cleanup Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. --- sys/fs/unionfs/union.h | 5 ++--- sys/fs/unionfs/union_subr.c | 37 ++++++++++++++++++------------------- sys/fs/unionfs/union_vnops.c | 6 +++--- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index fe5a578ef4dc..7317bfff534c 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -139,9 +139,8 @@ void unionfs_get_node_status(struct unionfs_node *, struct thread *, struct unionfs_node_status **); void unionfs_tryrem_node_status(struct unionfs_node *, struct unionfs_node_status *); -int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *td); -int unionfs_copyfile(struct vnode *, int, struct ucred *, - struct thread *); +int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *); +int unionfs_copyfile(struct vnode *, int, struct ucred *, struct thread *); int unionfs_copylink(struct vnode *, struct ucred *, struct thread *); void unionfs_create_uppervattr_core(struct unionfs_mount *, struct vattr *, struct vattr *, struct thread *); diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 0774d4fb69be..90be4d6af812 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -84,19 +84,19 @@ static void unionfs_deferred_rele(void *, int); /* * Initialize */ -int +int unionfs_init(struct vfsconf *vfsp) { UNIONFSDEBUG("unionfs_init\n"); /* printed during system boot */ TASK_INIT(&unionfs_deferred_rele_task, 0, unionfs_deferred_rele, NULL); - mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); + mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); return (0); } /* * Uninitialize */ -int +int unionfs_uninit(struct vfsconf *vfsp) { taskqueue_quiesce(taskqueue_unionfs_rele); @@ -290,7 +290,7 @@ unionfs_nodeget_cleanup(struct vnode *vp, struct unionfs_node *unp) /* * Make a new or get existing unionfs node. - * + * * uppervp and lowervp should be unlocked. Because if new unionfs vnode is * locked, uppervp or lowervp is locked too. In order to prevent dead lock, * you should not lock plurality simultaneously. @@ -709,9 +709,9 @@ unionfs_create_uppervattr(struct unionfs_mount *ump, struct vnode *lvp, /* * relookup - * + * * dvp should be locked on entry and will be locked on return. - * + * * If an error is returned, *vpp will be invalid, otherwise it will hold a * locked, referenced vnode. If *vpp == dvp then remember that only one * LK_EXCLUSIVE lock is held. @@ -756,7 +756,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, /* * Update the unionfs_node. - * + * * uvp is new locked upper vnode. unionfs vnode's lock will be exchanged to the * uvp's lock and lower's lock will be unlocked. */ @@ -875,10 +875,10 @@ unionfs_clear_in_progress_flag(struct vnode *vp, unsigned int flag) /* * Create a new shadow dir. - * + * * dvp and vp are unionfs vnodes representing a parent directory and * child file, should be locked on entry, and will be locked on return. - * + * * If no error returned, unp will be updated. */ int @@ -1201,7 +1201,7 @@ unionfs_forward_vop_finish_pair( /* * Create a new whiteout. - * + * * dvp and vp are unionfs vnodes representing a parent directory and * child file, should be locked on entry, and will be locked on return. */ @@ -1259,11 +1259,11 @@ unionfs_mkwhiteout_cleanup: } /* - * Create a new vnode for create a new shadow file. - * + * Create a new regular file on upper. + * * If an error is returned, *vpp will be invalid, otherwise it will hold a * locked, referenced and opened vnode. - * + * * unp is never updated. */ static int @@ -1343,8 +1343,8 @@ unionfs_vn_create_on_upper_cleanup: } /* - * Copy from lvp to uvp. - * + * Copy contents of lvp to uvp. + * * lvp and uvp should be locked and opened on entry and will be locked and * opened on return. */ @@ -1410,13 +1410,12 @@ unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp, /* * Copy file from lower to upper. - * - * If you need copy of the contents, set 1 to docopy. Otherwise, set 0 to - * docopy. + * + * If docopy is non-zero, copy the contents as well. * * vp is a unionfs vnode that should be locked on entry and will be * locked on return. - * + * * If no error returned, unp will be updated. */ int diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index cefd591a9a0f..63e5cd54ade5 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1183,7 +1183,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap) KASSERT_UNIONFS_VNODE(ap->a_vp); - vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); unp = VTOUNIONFS(ap->a_vp); unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); @@ -1210,7 +1210,7 @@ unionfs_poll(struct vop_poll_args *ap) KASSERT_UNIONFS_VNODE(ap->a_vp); - vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); unp = VTOUNIONFS(ap->a_vp); unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); @@ -3089,7 +3089,7 @@ struct vop_vector unionfs_vnodeops = { .vop_add_writecount = unionfs_add_writecount, .vop_vput_pair = unionfs_vput_pair, .vop_set_text = unionfs_set_text, - .vop_unset_text = unionfs_unset_text, + .vop_unset_text = unionfs_unset_text, .vop_unp_bind = unionfs_unp_bind, .vop_unp_connect = unionfs_unp_connect, .vop_unp_detach = unionfs_unp_detach,