From owner-freebsd-current@FreeBSD.ORG Thu May 27 14:14:02 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC896106564A; Thu, 27 May 2010 14:14:02 +0000 (UTC) (envelope-from marcelorossi@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 879A78FC0A; Thu, 27 May 2010 14:14:01 +0000 (UTC) Received: by pwj4 with SMTP id 4so19421pwj.13 for ; Thu, 27 May 2010 07:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6JFc8q61MC5MtryN5s0a980SsdHu82aqr8q3WKn4BMo=; b=W3/vsSNk2KsVX9zWaBoMsIHK5QihGRsdOb4kaBOkIjxQyNr0SL6MiRbs73OC2EKGSR nlx9yTcKAeMXZ+Rd+TFxHPnr/xdhJ4pQcsRDKnfCjqcJZp3b7kGsthyfuucPw6tV5kfc wuOTcZHJ64i0sgdTrdSNyfwsGoBJJZzLv1/KE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=YP8IFM69ABdZHs+4fyxA7+wmk5khwYotb8F864vY4OjNbzNF2vH68t1ioMDYoV9/Ve MyD+rThz7d9zGZSuF/VZrkg5rV4oU0wQb9+ui8mobfhp/YfwzmZ/rfTJTAxnbn53qjXQ Z+KKKWvC8TrL7Qfd0TsB7FEEt4g1vU74kgU7E= Received: by 10.229.191.3 with SMTP id dk3mr2269638qcb.25.1274969640095; Thu, 27 May 2010 07:14:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.80.6 with HTTP; Thu, 27 May 2010 07:13:38 -0700 (PDT) In-Reply-To: <201005270933.42760.jhb@freebsd.org> References: <201005270933.42760.jhb@freebsd.org> From: "Marcelo/Porks" Date: Thu, 27 May 2010 11:13:38 -0300 Message-ID: To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Garrett Cooper , freebsd-current@freebsd.org, Jeff Roberson , current@freebsd.org 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 14:14:02 -0000 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 >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> > --- sbin/tunefs/tunefs.c =A0 =A0 =A0 =A0(revision 208580) >> > +++ sbin/tunefs/tunefs.c =A0 =A0 =A0 =A0(working copy) >> > @@ -460,6 +460,14 @@ >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((~sblock.fs_flags &= FS_DOSOFTDEP) =3D=3D > FS_DOSOFTDEP) >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0warnx("= %s remains unchanged as disabled", > name); >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else { >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* also = disable SUJ */ >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((sbl= ock.fs_flags & FS_SUJ) =3D=3D FS_SUJ) > { >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 warnx("soft updates journaling >> > will be disabled too"); >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 journal_clear(); >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 sblock.fs_flags &=3D ~FS_SUJ; >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 sblock.fs_sujfree =3D 0; >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 warnx("remove .sujournal to >> > reclaim space"); >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sblock.= fs_flags &=3D ~FS_DOSOFTDEP; >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0warnx("= %s cleared", name); >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> > I think that attempting to disable SU if SUJ > is enabled should just fail with an error message. =A0The sysadmin can th= en > 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? --=20 Marcelo Rossi "This e-mail is provided "AS IS" with no warranties, and confers no rights.= "