From owner-freebsd-stable@FreeBSD.ORG Fri Nov 2 19:57:18 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DF2126C; Fri, 2 Nov 2012 19:57:18 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id AEC8E8FC0A; Fri, 2 Nov 2012 19:57:17 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id 16so2658099wgi.31 for ; Fri, 02 Nov 2012 12:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rXn6HI7M772o12lyAGsWHXH0VdVb9DSsz4yNL7F4VtQ=; b=siUuvCo2KYHbP72/kztTPFtEHxVeEYogzxVEkrt0whQrxFDkjxATV11izb1gFbint6 GYvW9v4yzXxjyrAj91YVbH5hymSMLKLB2fwL+7AKopIlxxWtdMfghGMApJVFxBC3tjr8 njeGEISX0yPkCAoxKzotb/y+c9Si+f4CSg68AjGbTpGXjCr3//NbS20eAqBTxFF2hiPn AhYLwxC3vnfpKqZhXUfo/rdRK5EFExEb/FriLft7ovXZI7suX7fCJToZFR8WauNOM//e W67Fbrxd3/DniQJbkV/iEIvzKFb98FvMKWTxNfDgxip3IYcn8RIRzRBn2WinU1AFqEg2 CLMg== Received: by 10.216.211.19 with SMTP id v19mr1022500weo.91.1351886231501; Fri, 02 Nov 2012 12:57:11 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id en20sm3259532wid.4.2012.11.02.12.57.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Nov 2012 12:57:10 -0700 (PDT) Date: Fri, 2 Nov 2012 20:57:01 +0100 From: Mateusz Guzik To: Gary Palmer Subject: Re: [patch] Re: SU+J on 9.1-RC2 ISO Message-ID: <20121102195701.GA496@dft-labs.eu> References: <5093F934.7050306@ose.nl> <5093FD3D.3080201@ateamsystems.com> <1351876381.2657.1.camel@mjakubik.localdomain> <50940276.5030306@ateamsystems.com> <50940C20.3090409@ose.nl> <50940E40.3090709@ose.nl> <5094112C.2070102@ose.nl> <20121102184131.GB22755@dft-labs.eu> <20121102185929.GA24320@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20121102185929.GA24320@in-addr.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Bas Smeelen , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 19:57:18 -0000 On Fri, Nov 02, 2012 at 02:59:29PM -0400, Gary Palmer wrote: > On Fri, Nov 02, 2012 at 07:41:31PM +0100, Mateusz Guzik wrote: > > On Fri, Nov 02, 2012 at 07:30:04PM +0100, Bas Smeelen wrote: > > > On 11/02/2012 07:17 PM, Bas Smeelen wrote: > > > > On 11/02/2012 07:08 PM, Bas Smeelen wrote: > > > >> On 11/02/2012 06:27 PM, Adam Strohl wrote: > > > >>> On 11/3/2012 0:13, Mike Jakubik wrote: > > > >>>> You can disable SU+J after installing, though it would be nice if the > > > >>>> installer gave you a choice. > > > >>> This assumes that you know about this flaw, which most people do not. > > > >>> > > > >>> I didn't until I discovered it by panic-ing a perfectly fine running > > > >>> server. Getting burned by a known bug like this shouldn't be "SOP" > > > >>> for users of FreeBSD. > > > >>> > > > >>> If anything it should be turned off by default, and people can turn it > > > >>> on if they want given the landmine it plants. If they know how to > > > >>> turn it on they're much more likely to be aware of the issue. > > > >>> > > > >>> > > > >>> > > > To sum it up > > > SU+J should be turned off by default because of > > > 1. It does not work with dumping a live system e.g. snapshot > > > 2. it is not recommended for SSD installs > > > 3. "Smart" admins can turn it on if they want > > > > > > root@sys:/usr/src/usr.sbin/bsdinstall/partedit # diff -u gpart_ops.c > > > gpart_ops.cnew > > > --- gpart_ops.c 2012-08-06 01:54:33.000000000 +0200 > > > +++ gpart_ops.cnew 2012-11-02 19:07:45.000000000 +0100 > > > @@ -90,8 +90,8 @@ > > > {"SU", "Softupdates", > > > "Enable softupdates (default)", 1 }, > > > {"SUJ", "Softupdates journaling", > > > - "Enable file system journaling (default - " > > > - "turn off for SSDs)", 1 }, > > > + "Disable file system journaling (default - " > > > + "turn on for adventurish admins)", 0 }, > > > {"TRIM", "Enable SSD TRIM support", > > > "Enable TRIM support, useful on solid-state drives", > > > 0 }, > > > > > > Please comment, then I can file a PR or not > > > > As was noted in my another mail, the kernel will no longer crash when an > > attempt to take a snapshot is made. Also AFAIR SUJ can be disabled > > later. > > > > Given that I prefer the following: > > > > diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c > > index 479365a..80296c2 100644 > > --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c > > +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c > > @@ -91,7 +91,7 @@ newfs_command(const char *fstype, char *command, int use_default) > > "Enable softupdates (default)", 1 }, > > {"SUJ", "Softupdates journaling", > > "Enable file system journaling (default - " > > - "turn off for SSDs)", 1 }, > > + "turn off for SSDs or if you use snapshots)", 1 }, > > {"TRIM", "Enable SSD TRIM support", > > "Enable TRIM support, useful on solid-state drives", > > 0 }, > > > > http://people.freebsd.org/~mjg/patches/suj-snapshot-comment.diff > > How many people realise that snapshots are needed for dump based backups > (and other related features)? > I thought this is a common knowledge. When you run dump without -L on a live filesystem, it advises you to re-run with -L option. And -L description in the man page clearly states that it uses snapshots. The comment can be updated to mention that snapshots are used by dump with -L. I don't have a strong opinion on this subject, just wanted to correct Adam on his claims regarding panics with snapshots and while here I provided a patch that is more likely to get accepted since it does not change any defaults (and I hoped it would address concerns about admins installing new systems with SUJ unaware that it does not work with snapshots). -- Mateusz Guzik