summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-10-03 16:19:28 +0000
committerbde <bde@FreeBSD.org>1998-10-03 16:19:28 +0000
commite7b28f3337e3b7d487743f78ea128e5b1ab4795c (patch)
tree8faed07109d1c7c53eb732b71785b8b5248855de /sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
parent054b0e3c44d5cc0a07937d0759a73b6649bfa51b (diff)
downloadFreeBSD-src-e7b28f3337e3b7d487743f78ea128e5b1ab4795c.zip
FreeBSD-src-e7b28f3337e3b7d487743f78ea128e5b1ab4795c.tar.gz
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).
Diffstat (limited to 'sys/gnu/fs/ext2fs/ext2_linux_ialloc.c')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_linux_ialloc.c6
1 files changed, 1 insertions, 5 deletions
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);
}
OpenPOWER on IntegriCloud