`numdirtybuffers' was not maintained properly. This caused excessive

flushing of buffers in an attempt to reduce numdirtybuffers, and
perhaps other problems.
This commit is contained in:
Bruce Evans 1997-10-07 11:10:18 +00:00
parent 44a8636f2a
commit dab8d6e4e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30204
2 changed files with 8 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}