From owner-freebsd-fs@freebsd.org Mon Jan 18 15:48:31 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07959A87DFD for ; Mon, 18 Jan 2016 15:48:31 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 926451D22 for ; Mon, 18 Jan 2016 15:48:30 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id b14so129399344wmb.1 for ; Mon, 18 Jan 2016 07:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-type:content-transfer-encoding; bh=bPrqhsRXMaFQsktj8YZIHZuLhYEjneIL41oprQEzF+A=; b=vaplN2sx3VECJjOMDLCzaVqF0Mt+MAC7RnsoVCYYZ3OuqKX/NRG/1lvqU5lO81+8L6 Q2EAPFhM8q4UpxeF2tqYbJBA8hcqlBx/mDUa6+/qsKbw9oH1jqBmbtjf6sdFOKw6JKOK h79jtTLh4HuBRejZmjiqGOgq4K+1SQB8YhYBMZ+g+oztgaZb2Zy7LXK3ov5aVeS7hYVc sn1lhI+JNm0Y3WXDqmFgORJHZO+ODheLHcrkeBAf3+mZtmkJW4ZSsy6LnC3gO5+Vb4u/ N0+o4rAP2TRLqv8fGvtNk+21oe0H3NwD7zJT1ZDiiMEci2+XcNWjVUzcOY1qxDo5//Fe 9bmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-type :content-transfer-encoding; bh=bPrqhsRXMaFQsktj8YZIHZuLhYEjneIL41oprQEzF+A=; b=ZMLZL/Uawe5TczHNSyFE9EkWtpOPYnN/ddhAzEcmlLiTPn6zMp7izEjz2daziIpwSK IdioxBOQn3Ux74DbW92gwp6ivdP6mxVSweHCBik7cSz4Ek5NOXnuDmjorF67I7I1dBGu 2vW3g06c2obT5iK3EghU4W1R+EsOj7AWt4iwpHyo/sIsNvpxDujl1eHlLk4PTRvdm7T3 eLe/rLhZcBnN1cTimj4oOnR37civly5WzhQkRrPzcIstalHHM+qzZ0yeOKG5FdGBpbvI nz5ACof7PwmtclrRCCDhJ2Hdsm5SFWlDh98LeVZkNsVhAsJgAAnAnY4u7+8md3QIJ4h7 pj3w== X-Gm-Message-State: ALoCoQkHIsdFhI1hhxFMkazTn8xOaU7g9ewYaZYnHUmSiPVChIlsrOMawKVohRSJJbr0iHQOBDuA5HQHPHekLMZ8Vl5S9EYbZw== X-Received: by 10.194.111.232 with SMTP id il8mr29245785wjb.150.1453132109132; Mon, 18 Jan 2016 07:48:29 -0800 (PST) Received: from ernst.home (p4FCA6205.dip0.t-ipconnect.de. [79.202.98.5]) by smtp.gmail.com with ESMTPSA id 79sm16373221wmo.7.2016.01.18.07.48.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 07:48:28 -0800 (PST) Date: Mon, 18 Jan 2016 16:48:28 +0100 From: Gary Jennejohn To: "Ronald Klop" Cc: freebsd-fs@freebsd.org Subject: Re: [Bug 206328] Crash on shutdown with swap on NFS file (with patch) Message-ID: <20160118164828.2aedaac8@ernst.home> In-Reply-To: References: Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2016 15:48:31 -0000 On Mon, 18 Jan 2016 13:15:22 +0100 "Ronald Klop" wrote: > On Mon, 18 Jan 2016 10:48:10 +0100, wrote: > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206328 > > > > --- Comment #3 from Tom Vijlbrief --- > > bufshutdown() ends with: > > > > > > if (panicstr == NULL) > > vfs_unmountall(); > > } > > swapoff_all(); > > > > Why not just reverse the order? > > > > So swapoff_all() before the vfs_unmountall(), so that the NFS filesystem > > is > > still available. > > > > Perhaps even at the start of bufshutdown(). > > > > Still wondering what the reason of a swapoff_all() call just before the > > actual > > reboot is. > > > > Maybe... leaving swap on a mirrored disk will give a rebuild of the mirror > on boot if swap is not swapped off. > Right, eventually swapgeom_close() gets called to clean things up. Still, it seems rather strange that all the swapped out pages are paged back in when the utlimate goal is to close the swap devices cleanly. Of course, there is some logic in the code to handle the case where some process(es) may be actively swapping while the kernel is shutting things down. -- Gary Jennejohn