Subject: CVS commit: src/sys/fs/puffs
To: None <source-changes@NetBSD.org>
From: Antti Kantee <pooka@netbsd.org>
List: source-changes
Date: 05/01/2007 12:18:40
Module Name:	src
Committed By:	pooka
Date:		Tue May  1 12:18:40 UTC 2007

Modified Files:
	src/sys/fs/puffs: puffs_msgif.c puffs_subr.c puffs_sys.h
	    puffs_transport.c puffs_vfsops.c

Log Message:
Fix a problem introduced when I converted puffs to use newlock2:
when unmounting the file system in case of a certain timing (and
possibly some other conditions), a thread would wait on a condition
variable, while another thread broadcast the cv and immediately
proceeded to destroy it.  The result was a system frozen completely
solid shorly after the process waiting for the cv woke up.  So
introduce reference counting to synchronize destruction of the
resources in unmount.

I was able to repeat the problem only on my laptop in some special
cases, so I do not know how common it was.  Ironically, killing
the file server process violently instead of unmount() didn't have
this problem because it never entered the unmount path from two
directions.


To generate a diff of this commit:
cvs rdiff -r1.33 -r1.34 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -r1.27 -r1.28 src/sys/fs/puffs/puffs_subr.c
cvs rdiff -r1.32 -r1.33 src/sys/fs/puffs/puffs_sys.h
cvs rdiff -r1.16 -r1.17 src/sys/fs/puffs/puffs_transport.c
cvs rdiff -r1.40 -r1.41 src/sys/fs/puffs/puffs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.