From 4434ff1d386ed866bc6210ede80181c76c2f1320 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Sun, 30 Jan 2000 20:32:59 +0000 Subject: [PATCH] When writing out bitmap buffers, need to skip over ones that already have a write in progress. Otherwise one can get in an infinite loop trying to get them all flushed. Submitted by: Matthew Dillon --- sys/contrib/softupdates/ffs_softdep.c | 3 ++- sys/ufs/ffs/ffs_softdep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/contrib/softupdates/ffs_softdep.c b/sys/contrib/softupdates/ffs_softdep.c index b06179274611..a137ce7ed361 100644 --- a/sys/contrib/softupdates/ffs_softdep.c +++ b/sys/contrib/softupdates/ffs_softdep.c @@ -3817,7 +3817,8 @@ softdep_fsync_mountdev(vp) * dependencies. */ if ((wk = LIST_FIRST(&bp->b_dep)) == NULL || - wk->wk_type != D_BMSAFEMAP) { + wk->wk_type != D_BMSAFEMAP || + (bp->b_xflags & BX_BKGRDINPROG)) { BUF_UNLOCK(bp); continue; } diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index b06179274611..a137ce7ed361 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3817,7 +3817,8 @@ softdep_fsync_mountdev(vp) * dependencies. */ if ((wk = LIST_FIRST(&bp->b_dep)) == NULL || - wk->wk_type != D_BMSAFEMAP) { + wk->wk_type != D_BMSAFEMAP || + (bp->b_xflags & BX_BKGRDINPROG)) { BUF_UNLOCK(bp); continue; }