Clear B_AGE in bdirty(), this buffer must go through the LRU again

to be back on the AGE queue. Otherwise we risk recycling a set
of buffers with (soft) dependencies on the AGE list, which may
last forever if the vnode they belong to is locked (i.e. the syncer
won't get to the buffers they depend on, so their dependencies
are never flushed).
This commit is contained in:
fvdl 1999-11-26 17:18:15 +00:00
parent 506836faa1
commit 2aea14c604
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_bio.c,v 1.60 1999/11/23 23:52:40 fvdl Exp $ */
/* $NetBSD: vfs_bio.c,v 1.61 1999/11/26 17:18:15 fvdl Exp $ */
/*-
* Copyright (c) 1994 Christopher G. Demetriou
@ -462,6 +462,8 @@ bdirty(bp)
s = splbio();
CLR(bp->b_flags, B_AGE);
if (!ISSET(bp->b_flags, B_DELWRI)) {
SET(bp->b_flags, B_DELWRI);
p->p_stats->p_ru.ru_oublock++;