Subject: PR/26043 CVS commit: src/sys/ufs
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Konrad Schroder <perseant@netbsd.org>
List: netbsd-bugs
Date: 03/23/2005 00:13:01
The following reply was made to PR kern/26043; it has been noted by GNATS.
From: Konrad Schroder <perseant@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/26043 CVS commit: src/sys/ufs
Date: Wed, 23 Mar 2005 00:12:51 +0000 (UTC)
Module Name: src
Committed By: perseant
Date: Wed Mar 23 00:12:51 UTC 2005
Modified Files:
src/sys/ufs/lfs: lfs_alloc.c lfs_vnops.c
src/sys/ufs/ufs: ufs_vnops.c
Log Message:
Make LFS dirops get their vnode first, before incrementing the dirop count,
to prevent a deadlock trying to call VOP_PUTPAGES() on a VDIROP vnode.
This can happen when a stacked filesystem is mounted on top of an LFS: an
LFS dirop needs to get a vnode, which is available from the upper layer.
The corresponding lower layer vnode, however, is VDIROP, so the upper layer
can't be cleaned out since its VOP_PUTPAGES() is passed through to the lower
layer, which waits for dirops to drain before it can proceed. Deadlock.
Tweak ufs_makeinode() and ufs_mkdir() to pass the a_vpp argument through
to VOP_VALLOC().
Partially addresses PR # 26043, though it probably does not completely fix
the problem described there.
To generate a diff of this commit:
cvs rdiff -r1.76 -r1.77 src/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -r1.137 -r1.138 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -r1.126 -r1.127 src/sys/ufs/ufs/ufs_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.