summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-12-11 05:27:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-12-11 05:27:41 +0000
commitd1538d110d9557ee9f9e4b04b6cba258e4f43d3a (patch)
treefd0c509c4d351be908d5ccc6ae3ffd4b0a61c6a5 /sys/arch/macppc
parent2921b422210353885272232bc38314523b006e06 (diff)
In uvm Chuck decided backing store would not be allocated proactively
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/macppc/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 18ed83f1a52..6aaae3cb1cb 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.181 2017/06/13 01:42:12 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.182 2017/12/11 05:27:40 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -743,7 +743,7 @@ boot(int howto)
boothowto = howto;
if ((howto & RB_NOSYNC) == 0 && !syncing) {
syncing = 1;
- vfs_shutdown();
+ vfs_shutdown(curproc);
if ((howto & RB_TIMEBAD) == 0) {
resettodr();