Source-Changes-HG archive

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

[src/netbsd-2-0]: src/share/man/man9 Pull up revision 1.21 (requested by wrst...



details:   https://anonhg.NetBSD.org/src/rev/5ca9e1328b95
branches:  netbsd-2-0
changeset: 561244:5ca9e1328b95
user:      tron <tron%NetBSD.org@localhost>
date:      Sun May 30 15:13:00 2004 +0000

description:
Pull up revision 1.21 (requested by wrstuden in ticket #425):
Change comments around locking. While you _can_ grab vnode locks
as LK_SHARED, the VOP_ code (in all our existing file systems)
was implememted assuming exclusive locking. Use of LK_SHARED
is technically a bug and only works right for uni-processor and
big-lock SMP systems. Our current file systems will blow up
(probably quite subtlely) with LK_SHARED and fine-grained SMP
locking.

diffstat:

 share/man/man9/vnode.9 |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r c2a0fa38984d -r 5ca9e1328b95 share/man/man9/vnode.9
--- a/share/man/man9/vnode.9    Sun May 30 15:09:52 2004 +0000
+++ b/share/man/man9/vnode.9    Sun May 30 15:13:00 2004 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: vnode.9,v 1.20 2003/10/24 07:43:35 wiz Exp $
+.\"     $NetBSD: vnode.9,v 1.20.2.1 2004/05/30 15:13:00 tron Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -463,8 +463,12 @@
 Many file systems rely on it to prevent race conditions in updating
 file system type specific data structures rather than using their
 own private locks.
-The vnode lock operates as a multiple-reader (shared-access lock)
-or single-writer lock (exclusive access lock).
+The vnode lock can operate as a multiple-reader (shared-access lock)
+or single-writer lock (exclusive access lock), however many current file
+system implementations were written assuming only single-writer
+locking.
+Multiple-reader locking functions equivalently only in the presence
+of big-lock SMP locking or a uni-processor machine.
 The lock may be held while sleeping.
 While the
 .Em v_vnlock



Home | Main Index | Thread Index | Old Index