Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys Print a warning for non-mpsafe vnodes



details:   https://anonhg.NetBSD.org/src-all/rev/2da31efcf940
branches:  trunk
changeset: 933936:2da31efcf940
user:      Joerg Sonnenberger <joerg%bec.de@localhost>
date:      Thu Dec 26 23:36:07 2019 +0100

description:
Print a warning for non-mpsafe vnodes

diffstat:

 sys/kern/vnode_if.c |  5 +++++
 sys/sys/vnode.h     |  1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r 9333b581df14 -r 2da31efcf940 sys/kern/vnode_if.c
--- a/sys/kern/vnode_if.c       Fri May 15 23:08:27 2020 +0200
+++ b/sys/kern/vnode_if.c       Thu Dec 26 23:36:07 2019 +0100
@@ -86,6 +86,11 @@
                *mp = vp->v_mount;
        }
 
+       if (!*mpsafe && !(vp->v_vflag & VV_NONMPSAFE)) {
+               vp->v_vflag |= VV_NONMPSAFE;
+               printf("vnode %p on mount point %p is not mpsafe\n", vp, *mp);
+       }
+
        return 0;
 }
 
diff -r 9333b581df14 -r 2da31efcf940 sys/sys/vnode.h
--- a/sys/sys/vnode.h   Fri May 15 23:08:27 2020 +0200
+++ b/sys/sys/vnode.h   Thu Dec 26 23:36:07 2019 +0100
@@ -202,6 +202,7 @@
 #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 */
+#define        VV_NONMPSAFE    0x00000040      /* file system code is not MP safe, warned */
 
 /*
  * The second set are locked by vp->v_interlock.  VI_TEXT and VI_EXECMAP are



Home | Main Index | Thread Index | Old Index