From e7cdcb324074afe862ff79dff4056e372d7a7dcc Mon Sep 17 00:00:00 2001 From: kib Date: Thu, 14 Dec 2006 11:34:07 +0000 Subject: Resolve two deadlocks that could be caused by busy md device backed by vnode. Allow for md thread and the thread that owns lock on vnode backing the md device to do the write even when runningbufspace is exhausted. Tested by: Peter Holm Reviewed by: tegge MFC after: 2 weeks --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/kern/vfs_bio.c') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index db2aacd..0d49710 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -871,7 +871,8 @@ bufwrite(struct buf *bp) * or syncer daemon trying to clean up as that can lead * to deadlock. */ - if ((curthread->td_pflags & TDP_NORUNNINGBUF) == 0) + if ((curthread->td_pflags & TDP_NORUNNINGBUF) == 0 && + (bp->b_vp->v_vflag & VV_MD) == 0) waitrunningbufspace(); } -- cgit v1.1