From owner-freebsd-current@FreeBSD.ORG Wed May 26 23:56:25 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 7429A106566B for ; Wed, 26 May 2010 23:56:25 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 2757A8FC13 for ; Wed, 26 May 2010 23:56:24 +0000 (UTC) Received: by qyk11 with SMTP id 11so10430123qyk.13 for ; Wed, 26 May 2010 16:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XWQD+UBwzJ38PCfXLQg69iTYKk+2KzJ+lhl1U0c7FWQ=; b=exM8RJF7ERVho8kT30d0b/ovYGh4EFII/UlsvK9rykx0cdlJUD3djsQM/b2F1nlTDh rfRz0gwr5gZl5H4dLj1HW73K4uf7/kP3vy7X3dUZPnvivixH8ZEC+KaNnUI0s69iIKuw HoAxhgRK3HNqGSy2n59LOXH0b0OSvFiAEtLd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pLzgjUw8mQQg7z6BZX6WNRQc+rtDNLmXtwS7EbAN2Ivb+6L2Io69QvPh+AANDp4S1E qWflDScx/xQomnFO1T6oiszhycN0gOnFicq26/xfaHKXYMsnhYFEGituppSAEbM5j7ti TtvECifdk9h5QylzQFLIPxZO0WvqCwd3aUndQ= MIME-Version: 1.0 Received: by 10.224.64.72 with SMTP id d8mr5517296qai.109.1274918184249; Wed, 26 May 2010 16:56:24 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Wed, 26 May 2010 16:56:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 May 2010 16:56:24 -0700 Message-ID: From: Garrett Cooper To: "Marcelo/Porks" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: 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: Wed, 26 May 2010 23:56:25 -0000 On Wed, May 26, 2010 at 3:52 PM, Marcelo/Porks wro= te: > On 5/25/10, Marcelo/Porks wrote: >> Hi! I tested the r208241 and it's seems to be ok but this calls my >> atention to other thing: Could I disable de SU when the SUJ is >> enabled? >> >> I did some tests and seems that I can do this (logs bellow). >> >> But will SUJ work properly with SU disabled? > > 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 dis= able SUJ */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((sblock= .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 it makes sense to have this as a force option as someone may want to retain their journal instead of disposing of it automatically. I think that the 2nd warnx should be the first warnx, and the 2nd warnx can be removed as it'll be quickly followed up by cleared. Changing `remove' to `removing' and changing `.sujournal' to journal would a) make the action more correct and b) make the concept more straightforward as to what's being removed, as Jeff or someone else may decide to remove or rename .sujournal in the future, and it's just another thing that users don't have to understand that aren't familiar with FreeBSD or SUJ. Thanks, -Garrett