Date: Thu, 7 Aug 1997 03:07:13 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@freebsd.org Cc: dyson@freebsd.org Subject: ext2fs currupts numdirtybuffers Message-ID: <199708061707.DAA08697@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
ext2fs doesn't maintain the numdirtybuffers count properly. This makes
all file systems very slow (throughput is reduced 10 times here).
Bruce
diff -c2 ext2_linux_ialloc.c~ ext2_linux_ialloc.c
*** ext2_linux_ialloc.c~ Tue Aug 5 02:14:14 1997
--- ext2_linux_ialloc.c Thu Aug 7 02:42:00 1997
***************
*** 54,59 ****
void mark_buffer_dirty(struct buf *bh)
{
! numdirtybuffers++;
! bh->b_flags |= B_DELWRI;
bh->b_flags &= ~(B_READ | B_ERROR);
}
--- 54,61 ----
void mark_buffer_dirty(struct buf *bh)
{
! if (!(bh->b_flags & B_DELWRI)) {
! numdirtybuffers++;
! bh->b_flags |= B_DELWRI;
! }
bh->b_flags &= ~(B_READ | B_ERROR);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708061707.DAA08697>
