From owner-freebsd-current Mon Jan 24 21:33:22 2000 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 557BC14CB0 for ; Mon, 24 Jan 2000 21:33:20 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA98864; Mon, 24 Jan 2000 21:33:20 -0800 (PST) (envelope-from dillon) Date: Mon, 24 Jan 2000 21:33:20 -0800 (PST) From: Matthew Dillon Message-Id: <200001250533.VAA98864@apollo.backplane.com> To: current@freebsd.org Subject: Swapping to NFS via diskless mount broken - patch / review Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd like a quick review of this patch. It looks like swapdev_vnode changes broke diskless swapping too, not just swap-backed VN. I'm sure glad someone filed a PR on this (kern/16165) or we would have gone into release with this bug. Now, normally I would take this opportunity to put forth some innane comment directed towards the perpetrators, but at the moment I am simply going to leave it by expressing my profound unhappiness over the lack of testing that has gone into commits recently (last couple of months). Lets please not bof-up this release! -Matt Index: vm_swap.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_swap.c,v retrieving revision 1.95 diff -u -r1.95 vm_swap.c --- vm_swap.c 2000/01/10 12:04:27 1.95 +++ vm_swap.c 2000/01/25 04:49:32 @@ -210,14 +210,6 @@ if (error) vrele(vp); - if (!swapdev_vp) { - error = getnewvnode(VT_NON, NULL, swapdev_vnodeop_p, - &swapdev_vp); - if (error) - panic("Cannot get vnode for swapdev"); - swapdev_vp->v_type = VNON; /* Untyped */ - } - return (error); } @@ -245,6 +237,14 @@ register long blk; swblk_t dvbase; int error; + + if (!swapdev_vp) { + error = getnewvnode(VT_NON, NULL, swapdev_vnodeop_p, + &swapdev_vp); + if (error) + panic("Cannot get vnode for swapdev"); + swapdev_vp->v_type = VNON; /* Untyped */ + } ASSERT_VOP_UNLOCKED(vp, "swaponvp"); for (sp = swdevt, index = 0 ; index < nswdev; index++, sp++) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message