From 3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 7 Oct 1997 11:10:18 +0000 Subject: `numdirtybuffers' was not maintained properly. This caused excessive flushing of buffers in an attempt to reduce numdirtybuffers, and perhaps other problems. --- sys/gnu/fs/ext2fs/ext2_linux_ialloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/gnu/fs/ext2fs/ext2_linux_ialloc.c') diff --git a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c index 9f2a967..2b964b2 100644 --- a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c +++ b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c @@ -53,8 +53,10 @@ */ void mark_buffer_dirty(struct buf *bh) { - numdirtybuffers++; - bh->b_flags |= B_DELWRI; + if (!(bh->b_flags & B_DELWRI)) { + numdirtybuffers++; + bh->b_flags |= B_DELWRI; + } bh->b_flags &= ~(B_READ | B_ERROR); } -- cgit v1.1