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
This commit is contained in:
parent
20279a10b2
commit
3a715f43c6
@ -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); \
|
||||
}
|
||||
|
@ -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); \
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user