diff options
author | bde <bde@FreeBSD.org> | 1997-10-07 11:10:18 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-10-07 11:10:18 +0000 |
commit | 3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e (patch) | |
tree | 9af62aa7b92c0377e787983fad9e4edb6b2fa672 /sys/gnu | |
parent | 429da88473c9e89ca73e9fc5f555c23ddbb0adc4 (diff) | |
download | FreeBSD-src-3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e.zip FreeBSD-src-3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e.tar.gz |
`numdirtybuffers' was not maintained properly. This caused excessive
flushing of buffers in an attempt to reduce numdirtybuffers, and
perhaps other problems.
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_linux_ialloc.c | 6 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_linux_ialloc.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/gnu/ext2fs/ext2_linux_ialloc.c b/sys/gnu/ext2fs/ext2_linux_ialloc.c index 9f2a967..2b964b2 100644 --- a/sys/gnu/ext2fs/ext2_linux_ialloc.c +++ b/sys/gnu/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); } 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); } |