summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-11-10 14:54:15 +0000
committerbde <bde@FreeBSD.org>2000-11-10 14:54:15 +0000
commit449468044456ac7a8de4144457fc1010589735b9 (patch)
tree21527e8888b95ed53b51607ae2b06c1fe0bea2db /sys/gnu
parentad83297f7abda2a74a0d8ad1aaa01d65af1c4896 (diff)
downloadFreeBSD-src-449468044456ac7a8de4144457fc1010589735b9.zip
FreeBSD-src-449468044456ac7a8de4144457fc1010589735b9.tar.gz
Quick fix for not writing group descriptor group, inode bitmaps or
block bitmaps before unmount() completes. They were written using bdwrite(), so they were normally written less than 32 seconds after unmount(), but this is too late if the media is removed or the system is rebooted soon after unmount(). sync()ing before unmount() didn't help, because ext2fs uses buggy private caching for these blocks -- it doesn't even bdwrite() them until they are uncached or the filesystem is unmounted. sync()ing after unmount() didn't help, because sync() only applies to (vnodes for) mounted filesystems. PR: 22726
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/fs.h3
-rw-r--r--sys/gnu/fs/ext2fs/fs.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/gnu/ext2fs/fs.h b/sys/gnu/ext2fs/fs.h
index b8dab54..8bedb05 100644
--- a/sys/gnu/ext2fs/fs.h
+++ b/sys/gnu/ext2fs/fs.h
@@ -37,6 +37,7 @@
* SUCH DAMAGE.
*
* @(#)fs.h 8.7 (Berkeley) 4/19/94
+ * $FreeBSD$
*/
/*
@@ -177,7 +178,7 @@ extern u_char *fragtbl[];
bremfree(bp); \
splx(s); \
if (flags & B_DIRTY) \
- bdwrite(bp); \
+ bwrite(bp); \
else \
brelse(bp); \
}
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
index b8dab54..8bedb05 100644
--- a/sys/gnu/fs/ext2fs/fs.h
+++ b/sys/gnu/fs/ext2fs/fs.h
@@ -37,6 +37,7 @@
* SUCH DAMAGE.
*
* @(#)fs.h 8.7 (Berkeley) 4/19/94
+ * $FreeBSD$
*/
/*
@@ -177,7 +178,7 @@ extern u_char *fragtbl[];
bremfree(bp); \
splx(s); \
if (flags & B_DIRTY) \
- bdwrite(bp); \
+ bwrite(bp); \
else \
brelse(bp); \
}
OpenPOWER on IntegriCloud