Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove now unused VV_LOCKSWORK, all file systems support loc...
details: https://anonhg.NetBSD.org/src/rev/4fefa426b5a8
branches: trunk
changeset: 364372:4fefa426b5a8
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Mar 19 13:53:32 2022 +0000
description:
Remove now unused VV_LOCKSWORK, all file systems support locking.
Remove unused predicates vn_locked() and vn_anylocked().
Welcome to 9.99.95
diffstat:
share/man/man9/vnode.9 | 6 ++----
sys/fs/efs/efs_vfsops.c | 5 ++---
sys/fs/hfs/hfs_vfsops.c | 5 ++---
sys/fs/union/union_subr.c | 5 ++---
sys/kern/vfs_vnode.c | 19 ++++++-------------
sys/kern/vnode_if.sh | 6 +++---
sys/miscfs/deadfs/dead_vfsops.c | 6 +++---
sys/sys/param.h | 4 ++--
sys/sys/vnode.h | 20 +-------------------
sys/ufs/chfs/chfs_vfsops.c | 3 +--
sys/ufs/ext2fs/ext2fs_vfsops.c | 5 ++---
sys/ufs/ffs/ffs_vfsops.c | 5 ++---
sys/ufs/lfs/lfs_vfsops.c | 5 ++---
sys/ufs/mfs/mfs_vfsops.c | 6 ++----
14 files changed, 32 insertions(+), 68 deletions(-)
diffs (truncated from 418 to 300 lines):
diff -r 41a86651f02f -r 4fefa426b5a8 share/man/man9/vnode.9
--- a/share/man/man9/vnode.9 Sat Mar 19 13:52:45 2022 +0000
+++ b/share/man/man9/vnode.9 Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnode.9,v 1.83 2022/01/17 19:08:06 christos Exp $
+.\" $NetBSD: vnode.9,v 1.84 2022/03/19 13:53:32 hannken Exp $
.\"
.\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 17, 2022
+.Dd March 19, 2022
.Dt VNODE 9
.Os
.Sh NAME
@@ -216,8 +216,6 @@
This vnode might have user mappings.
.It Dv VV_MPSAFE
This file system is MP safe.
-.It Dv VV_LOCKSWORK
-This vnode's file system supports locking.
.It Dv VI_TEXT
This vnode is a pure text prototype.
.It Dv VI_EXECMAP
diff -r 41a86651f02f -r 4fefa426b5a8 sys/fs/efs/efs_vfsops.c
--- a/sys/fs/efs/efs_vfsops.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/fs/efs/efs_vfsops.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efs_vfsops.c,v 1.29 2020/01/17 20:08:07 ad Exp $ */
+/* $NetBSD: efs_vfsops.c,v 1.30 2022/03/19 13:53:32 hannken Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble%ephemeral.org@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.29 2020/01/17 20:08:07 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.30 2022/03/19 13:53:32 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -439,7 +439,6 @@
}
vp->v_tag = VT_EFS;
- vp->v_vflag |= VV_LOCKSWORK;
vp->v_data = eip;
genfs_node_init(vp, &efs_genfsops);
uvm_vnp_setsize(vp, eip->ei_size);
diff -r 41a86651f02f -r 4fefa426b5a8 sys/fs/hfs/hfs_vfsops.c
--- a/sys/fs/hfs/hfs_vfsops.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/fs/hfs/hfs_vfsops.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hfs_vfsops.c,v 1.37 2020/02/28 11:27:38 kamil Exp $ */
+/* $NetBSD: hfs_vfsops.c,v 1.38 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.37 2020/02/28 11:27:38 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.38 2022/03/19 13:53:32 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -583,7 +583,6 @@
vp->v_tag = VT_HFS;
vp->v_op = hfs_vnodeop_p;
- vp->v_vflag |= VV_LOCKSWORK;
vp->v_data = hnode;
genfs_node_init(vp, &hfs_genfsops);
diff -r 41a86651f02f -r 4fefa426b5a8 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/fs/union/union_subr.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.80 2022/03/19 13:48:04 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.81 2022/03/19 13:53:32 hannken Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.80 2022/03/19 13:48:04 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.81 2022/03/19 13:53:32 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -567,7 +567,6 @@
vp->v_tag = VT_UNION;
vp->v_op = union_vnodeop_p;
- vp->v_vflag |= VV_LOCKSWORK;
vp->v_data = un;
un->un_vnode = vp;
diff -r 41a86651f02f -r 4fefa426b5a8 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/kern/vfs_vnode.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.138 2022/03/19 13:52:11 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.139 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.138 2022/03/19 13:52:11 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.139 2022/03/19 13:53:32 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -771,9 +771,6 @@
return;
}
lktype = LK_NONE;
- } else if ((vp->v_vflag & VV_LOCKSWORK) == 0) {
- VOP_UNLOCK(vp);
- lktype = LK_NONE;
} else {
lktype = VOP_ISLOCKED(vp);
KASSERT(lktype != LK_NONE);
@@ -1816,8 +1813,7 @@
bool recycle, active;
int error;
- KASSERT((vp->v_vflag & VV_LOCKSWORK) == 0 ||
- VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
+ KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
KASSERT(mutex_owned(vp->v_interlock));
KASSERT(vrefcnt(vp) != 0);
@@ -1886,8 +1882,7 @@
* would no longer function.
*/
VOP_INACTIVE(vp, &recycle);
- KASSERT((vp->v_vflag & VV_LOCKSWORK) == 0 ||
- VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
+ KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
if (VOP_RECLAIM(vp)) {
vnpanic(vp, "%s: cannot reclaim", __func__);
}
@@ -1915,7 +1910,6 @@
/* Done with purge, notify sleepers of the grim news. */
mutex_enter(vp->v_interlock);
vp->v_op = dead_vnodeop_p;
- vp->v_vflag |= VV_LOCKSWORK;
VSTATE_CHANGE(vp, VS_RECLAIMING, VS_RECLAIMED);
vp->v_tag = VT_NON;
/*
@@ -1981,8 +1975,7 @@
vnpanic(vp, "%s: cannot lock", __func__);
}
VOP_INACTIVE(vp, &recycle);
- KASSERT((vp->v_vflag & VV_LOCKSWORK) == 0 ||
- VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
+ KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
if (VOP_RECLAIM(vp)) {
vnpanic(vp, "%s: cannot reclaim", __func__);
}
@@ -1993,7 +1986,7 @@
/* Done with purge, change operations vector. */
mutex_enter(vp->v_interlock);
vp->v_op = spec_vnodeop_p;
- vp->v_vflag |= VV_MPSAFE | VV_LOCKSWORK;
+ vp->v_vflag |= VV_MPSAFE;
mutex_exit(vp->v_interlock);
/*
diff -r 41a86651f02f -r 4fefa426b5a8 sys/kern/vnode_if.sh
--- a/sys/kern/vnode_if.sh Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/kern/vnode_if.sh Sat Mar 19 13:53:32 2022 +0000
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
"
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.72 2021/10/20 03:08:18 thorpej Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.73 2022/03/19 13:53:32 hannken Exp $'
# Script to produce VFS front-end sugar.
#
@@ -704,8 +704,8 @@
printf("\ta.a_%s = %s;\n", argname[i], argname[i]);
if (lockdebug && lockstate[i] != -1) {
printf("#ifdef VNODE_LOCKDEBUG\n");
- printf("\tislocked_%s = (%s->v_vflag & VV_LOCKSWORK) ? (VOP_ISLOCKED(%s) == LK_EXCLUSIVE) : %d;\n",
- argname[i], argname[i], argname[i], lockstate[i]);
+ printf("\tislocked_%s = (VOP_ISLOCKED(%s) == LK_EXCLUSIVE);\n",
+ argname[i], argname[i]);
printf("\tif (islocked_%s != %d)\n", argname[i],
lockstate[i]);
printf("\t\tpanic(\"%s: %s: locked %%d, expected %%d\", islocked_%s, %d);\n", name, argname[i], argname[i], lockstate[i]);
diff -r 41a86651f02f -r 4fefa426b5a8 sys/miscfs/deadfs/dead_vfsops.c
--- a/sys/miscfs/deadfs/dead_vfsops.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/miscfs/deadfs/dead_vfsops.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dead_vfsops.c,v 1.10 2022/03/19 13:52:11 hannken Exp $ */
+/* $NetBSD: dead_vfsops.c,v 1.11 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dead_vfsops.c,v 1.10 2022/03/19 13:52:11 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dead_vfsops.c,v 1.11 2022/03/19 13:53:32 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -104,7 +104,7 @@
vp->v_tag = VT_NON;
vp->v_type = vap->va_type;
vp->v_op = spec_vnodeop_p;
- vp->v_vflag |= VV_MPSAFE | VV_LOCKSWORK;
+ vp->v_vflag |= VV_MPSAFE;
uvm_vnp_setsize(vp, 0);
spec_node_init(vp, vap->va_rdev);
diff -r 41a86651f02f -r 4fefa426b5a8 sys/sys/param.h
--- a/sys/sys/param.h Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/sys/param.h Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.707 2022/03/03 07:31:24 riastradh Exp $ */
+/* $NetBSD: param.h,v 1.708 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
* 2.99.9 (299000900)
*/
-#define __NetBSD_Version__ 999009400 /* NetBSD 9.99.94 */
+#define __NetBSD_Version__ 999009500 /* NetBSD 9.99.95 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
diff -r 41a86651f02f -r 4fefa426b5a8 sys/sys/vnode.h
--- a/sys/sys/vnode.h Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/sys/vnode.h Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode.h,v 1.299 2022/01/17 19:12:31 christos Exp $ */
+/* $NetBSD: vnode.h,v 1.300 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -202,7 +202,6 @@
#define VV_ISTTY 0x00000004 /* vnode represents a tty */
#define VV_MAPPED 0x00000008 /* vnode might have user mappings */
#define VV_MPSAFE 0x00000010 /* file system code is MP safe */
-#define VV_LOCKSWORK 0x00000020 /* FS supports locking discipline */
/*
* The second set are locked by vp->v_interlock. VI_TEXT and VI_EXECMAP are
@@ -631,23 +630,6 @@
int vn_bdev_openpath(struct pathbuf *pb, struct vnode **, struct lwp *);
-#ifdef DIAGNOSTIC
-static __inline bool
-vn_locked(struct vnode *_vp)
-{
-
- return (_vp->v_vflag & VV_LOCKSWORK) == 0 ||
- VOP_ISLOCKED(_vp) == LK_EXCLUSIVE;
-}
-
-static __inline bool
-vn_anylocked(struct vnode *_vp)
-{
-
- return (_vp->v_vflag & VV_LOCKSWORK) == 0 || VOP_ISLOCKED(_vp);
-}
-#endif
-
/* initialise global vnode management */
void vntblinit(void);
diff -r 41a86651f02f -r 4fefa426b5a8 sys/ufs/chfs/chfs_vfsops.c
--- a/sys/ufs/chfs/chfs_vfsops.c Sat Mar 19 13:52:45 2022 +0000
+++ b/sys/ufs/chfs/chfs_vfsops.c Sat Mar 19 13:53:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_vfsops.c,v 1.22 2020/09/05 16:30:12 riastradh Exp $ */
+/* $NetBSD: chfs_vfsops.c,v 1.23 2022/03/19 13:53:32 hannken Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -500,7 +500,6 @@
Home |
Main Index |
Thread Index |
Old Index