Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2010 11:13:38 -0300
From:      "Marcelo/Porks" <marcelorossi@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Garrett Cooper <yanefbsd@gmail.com>, freebsd-current@freebsd.org, Jeff Roberson <jroberson@jroberson.net>, current@freebsd.org
Subject:   Re: SUJ Changes
Message-ID:  <AANLkTilQcxW02tav6LS86fUIxlDuaLPdtggmOqj6CDe1@mail.gmail.com>
In-Reply-To: <201005270933.42760.jhb@freebsd.org>
References:  <alpine.BSF.2.00.1005171616390.1398@desktop> <AANLkTikBdkw5NlrGib1Qq3QASfQk2kXPHU4N0AyxGviN@mail.gmail.com>  <AANLkTinMJN2awQw7W_PWCPbG-dt8obHBacnd9KUcRdY1@mail.gmail.com>  <201005270933.42760.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 27, 2010 at 10:33 AM, John Baldwin <jhb@freebsd.org> wrote:
> On Wednesday 26 May 2010 7:56:24 pm Garrett Cooper wrote:
>> On Wed, May 26, 2010 at 3:52 PM, Marcelo/Porks <marcelorossi@gmail.com> =
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.=
"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilQcxW02tav6LS86fUIxlDuaLPdtggmOqj6CDe1>