summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-12-12 14:19:11 +0000
committerphk <phk@FreeBSD.org>2004-12-12 14:19:11 +0000
commit729dda8f41bc7c5ec5b66365091b7cb2217b9cfa (patch)
tree45a20cc5aaca426f531a6a969c3497c3b2fcfa8b /sys/ufs
parentf3a49c2dd228317bfe9fa982096a2e291dd81e11 (diff)
downloadFreeBSD-src-729dda8f41bc7c5ec5b66365091b7cb2217b9cfa.zip
FreeBSD-src-729dda8f41bc7c5ec5b66365091b7cb2217b9cfa.tar.gz
With the introduction of UFS2 we started looking for superblocks in
four different locations on a prospective filesystem. If we found none, we forgot to invalidate the four buffers, thus the following sequence would fails: (md0 = blank disk) mount /dev/md0 /mnt (fails, no superblocks) newfs /dev/md0 (writes using physio which does not go through buffercache). mount /dev/md0 /mnt (still fails, the four cached buffers still contain no superblocks) Found by: ru
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 02b9a2e..c261e17 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -778,6 +778,7 @@ ffs_mountfs(devvp, mp, td)
out:
if (bp)
brelse(bp);
+ vinvalbuf(devvp, V_SAVE, NOCRED, td, 0, 0);
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
OpenPOWER on IntegriCloud