From owner-freebsd-current@FreeBSD.ORG Thu May 27 15:57:19 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E4C6106564A for ; Thu, 27 May 2010 15:57:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9EE8FC0A for ; Thu, 27 May 2010 15:57:19 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2117C46B2D; Thu, 27 May 2010 11:57:19 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 280338A01F; Thu, 27 May 2010 11:57:18 -0400 (EDT) From: John Baldwin To: "Marcelo/Porks" Date: Thu, 27 May 2010 11:47:20 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005270933.42760.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005271147.20155.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 27 May 2010 11:57:18 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Garrett Cooper , freebsd-current@freebsd.org, Jeff Roberson Subject: Re: SUJ Changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2010 15:57:19 -0000 On Thursday 27 May 2010 10:13:38 am Marcelo/Porks wrote: > On Thu, May 27, 2010 at 10:33 AM, John Baldwin wrote: > > On Wednesday 26 May 2010 7:56:24 pm Garrett Cooper wrote: > >> On Wed, May 26, 2010 at 3:52 PM, Marcelo/Porks wrote: > >> > > >> > Hi guys. I'm not sure if I could call this a problem but I can disable > >> > SU when SUJ is enabled, so SUJ will remain enabled and SU will be > >> > disabled. > >> > > >> > #tunefs -j enable /dev/device > >> > #tunefs -n disable /dev/device > >> > > >> > I did a patch for sbin/tunefs/tunefs.c that disable SUJ when the user > >> > disable SU. Maybe this will be useful for some of you. > >> > > >> > Thanks. > >> > > >> > > >> > Index: sbin/tunefs/tunefs.c > >> > =================================================================== > >> > --- sbin/tunefs/tunefs.c (revision 208580) > >> > +++ sbin/tunefs/tunefs.c (working copy) > >> > @@ -460,6 +460,14 @@ > >> > if ((~sblock.fs_flags & FS_DOSOFTDEP) == > > FS_DOSOFTDEP) > >> > warnx("%s remains unchanged as disabled", > > name); > >> > else { > >> > + /* also disable SUJ */ > >> > + if ((sblock.fs_flags & FS_SUJ) == FS_SUJ) > > { > >> > + warnx("soft updates journaling > >> > will be disabled too"); > >> > + journal_clear(); > >> > + sblock.fs_flags &= ~FS_SUJ; > >> > + sblock.fs_sujfree = 0; > >> > + warnx("remove .sujournal to > >> > reclaim space"); > >> > + } > >> > sblock.fs_flags &= ~FS_DOSOFTDEP; > >> > warnx("%s cleared", name); > >> > } > >> > > I think that attempting to disable SU if SUJ > > is enabled should just fail with an error message. The sysadmin can then > > choose to disable both SUJ and SU if desired. > > If SU is disabled and One tries to enable SUJ then SU will be > automatically enabled. > So Why not automatically disable SUJ when One tries to disable SU? I'm probably not a big fan of either really. :) For something as rarely done as tunefs I would prefer to err on the side of caution and require the admin to explicitly specify everything. -- John Baldwin