Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by hann...



details:   https://anonhg.NetBSD.org/src/rev/e768b05330f2
branches:  netbsd-9
changeset: 963852:e768b05330f2
user:      martin <martin%NetBSD.org@localhost>
date:      Fri May 01 11:54:53 2020 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #881):

        sys/kern/vfs_mount.c: revision 1.82

Undo Rev. 1.79, it breaks root-on-raid where it destroys the component
disks before the raid:

 forcefully unmounting / (/dev/raid0a)...
 sd1: detached
 sd0: detached
 raid0: cache flush to component /dev/sd0a failed.
 raid0: cache flush to component /dev/sd1a failed.
 fatal page fault in supervisor mode
 Stopped in pid 2356.2356 (reboot) at netbsd:sdstrategy+0x36

Reopens PR kern/54969: Disk cache is no longer flushed on shutdown

diffstat:

 sys/kern/vfs_mount.c |  25 ++-----------------------
 1 files changed, 2 insertions(+), 23 deletions(-)

diffs (60 lines):

diff -r 2966c49578c4 -r e768b05330f2 sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c      Fri May 01 11:53:07 2020 +0000
+++ b/sys/kern/vfs_mount.c      Fri May 01 11:54:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_mount.c,v 1.70.4.1 2020/04/22 18:05:11 martin Exp $        */
+/*     $NetBSD: vfs_mount.c,v 1.70.4.2 2020/05/01 11:54:53 martin Exp $        */
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.70.4.1 2020/04/22 18:05:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.70.4.2 2020/05/01 11:54:53 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -114,8 +114,6 @@
 /* Root filesystem. */
 vnode_t *                      rootvnode;
 
-extern struct mount            *dead_rootmount;
-
 /* Mounted filesystem list. */
 static TAILQ_HEAD(mountlist, mountlist_entry) mountlist;
 static kmutex_t                        mountlist_lock;
@@ -1002,7 +1000,6 @@
 vfs_unmountall1(struct lwp *l, bool force, bool verbose)
 {
        struct mount *mp;
-       mount_iterator_t *iter;
        bool any_error = false, progress = false;
        uint64_t gen;
        int error;
@@ -1037,24 +1034,6 @@
        if (any_error && verbose) {
                printf("WARNING: some file systems would not unmount\n");
        }
-
-       /* If the mountlist is empty destroy anonymous device vnodes. */
-       mountlist_iterator_init(&iter);
-       if (mountlist_iterator_next(iter) == NULL) {
-               struct vnode_iterator *marker;
-               vnode_t *vp;
-
-               vfs_vnode_iterator_init(dead_rootmount, &marker);
-               while ((vp = vfs_vnode_iterator_next(marker, NULL, NULL))) {
-                       if (vp->v_type == VCHR || vp->v_type == VBLK)
-                               vgone(vp);
-                       else
-                               vrele(vp);
-               }
-               vfs_vnode_iterator_destroy(marker);
-       }
-       mountlist_iterator_destroy(iter);
-
        return progress;
 }
 



Home | Main Index | Thread Index | Old Index