Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Switch spec_vnodeop vector to real vnode locking, VV_LOC...
details: https://anonhg.NetBSD.org/src/rev/d838922cf539
branches: trunk
changeset: 364370:d838922cf539
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Mar 19 13:52:11 2022 +0000
description:
Switch spec_vnodeop vector to real vnode locking, VV_LOCKSWORK now.
diffstat:
sys/kern/vfs_vnode.c | 7 +++----
sys/miscfs/deadfs/dead_vfsops.c | 6 +++---
sys/miscfs/specfs/spec_vnops.c | 10 +++++-----
3 files changed, 11 insertions(+), 12 deletions(-)
diffs (89 lines):
diff -r 4beaa13a3b4c -r d838922cf539 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Sat Mar 19 13:51:35 2022 +0000
+++ b/sys/kern/vfs_vnode.c Sat Mar 19 13:52:11 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.137 2022/03/15 15:27:43 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.138 2022/03/19 13:52:11 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.137 2022/03/15 15:27:43 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.138 2022/03/19 13:52:11 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -1993,8 +1993,7 @@
/* Done with purge, change operations vector. */
mutex_enter(vp->v_interlock);
vp->v_op = spec_vnodeop_p;
- vp->v_vflag |= VV_MPSAFE;
- vp->v_vflag &= ~VV_LOCKSWORK;
+ vp->v_vflag |= VV_MPSAFE | VV_LOCKSWORK;
mutex_exit(vp->v_interlock);
/*
diff -r 4beaa13a3b4c -r d838922cf539 sys/miscfs/deadfs/dead_vfsops.c
--- a/sys/miscfs/deadfs/dead_vfsops.c Sat Mar 19 13:51:35 2022 +0000
+++ b/sys/miscfs/deadfs/dead_vfsops.c Sat Mar 19 13:52:11 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dead_vfsops.c,v 1.9 2019/01/01 10:06:54 hannken Exp $ */
+/* $NetBSD: dead_vfsops.c,v 1.10 2022/03/19 13:52:11 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.9 2019/01/01 10:06:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dead_vfsops.c,v 1.10 2022/03/19 13:52:11 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;
+ vp->v_vflag |= VV_MPSAFE | VV_LOCKSWORK;
uvm_vnp_setsize(vp, 0);
spec_node_init(vp, vap->va_rdev);
diff -r 4beaa13a3b4c -r d838922cf539 sys/miscfs/specfs/spec_vnops.c
--- a/sys/miscfs/specfs/spec_vnops.c Sat Mar 19 13:51:35 2022 +0000
+++ b/sys/miscfs/specfs/spec_vnops.c Sat Mar 19 13:52:11 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spec_vnops.c,v 1.183 2021/07/18 23:57:14 dholland Exp $ */
+/* $NetBSD: spec_vnops.c,v 1.184 2022/03/19 13:52:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.183 2021/07/18 23:57:14 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.184 2022/03/19 13:52:11 hannken Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -148,12 +148,12 @@
{ &vop_abortop_desc, genfs_badop }, /* abortop */
{ &vop_inactive_desc, spec_inactive }, /* inactive */
{ &vop_reclaim_desc, spec_reclaim }, /* reclaim */
- { &vop_lock_desc, genfs_nolock }, /* lock */
- { &vop_unlock_desc, genfs_nounlock }, /* unlock */
+ { &vop_lock_desc, genfs_lock }, /* lock */
+ { &vop_unlock_desc, genfs_unlock }, /* unlock */
{ &vop_bmap_desc, spec_bmap }, /* bmap */
{ &vop_strategy_desc, spec_strategy }, /* strategy */
{ &vop_print_desc, spec_print }, /* print */
- { &vop_islocked_desc, genfs_noislocked }, /* islocked */
+ { &vop_islocked_desc, genfs_islocked }, /* islocked */
{ &vop_pathconf_desc, spec_pathconf }, /* pathconf */
{ &vop_advlock_desc, spec_advlock }, /* advlock */
{ &vop_bwrite_desc, vn_bwrite }, /* bwrite */
Home |
Main Index |
Thread Index |
Old Index