From e7b28f3337e3b7d487743f78ea128e5b1ab4795c Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 3 Oct 1998 16:19:28 +0000 Subject: Quick fix for not being able to sync all the buffers in boot() if an ext2fs file system is mounted. The soft update changes added a check for B_DELWRI buffers. This exposed the complete brokenness of the previous quick fix for failing syncs (PR 3571, committed on 1997/08/04). Use a new buffer flag B_DIRTY and don't abuse B_DELWRI. B_DIRTY buffers are still written too late, as broken in the previous fix. This is fairly harmless, because B_DIRTY is only used for bitmap buffers and fsck.ext2 can fix up the bitmaps perfectly. Fixed a race in ULCK_BUF() (bremfree() was outside of the splbio() section). --- sys/gnu/fs/ext2fs/ext2_linux_ialloc.c | 6 +----- 1 file changed, 1 insertion(+), 5 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 00e1a5a..4cfb6a7 100644 --- a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c +++ b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c @@ -56,11 +56,7 @@ void mark_buffer_dirty(struct buf *bh) int s; s = splbio(); - if (!(bh->b_flags & B_DELWRI)) { - numdirtybuffers++; - bh->b_flags |= B_DELWRI; - bh->b_flags &= ~(B_READ | B_ERROR); - } + bh->b_flags |= B_DIRTY; splx(s); } -- cgit v1.1