Date: Wed, 26 May 2010 18:57:20 -0700 From: Garrett Cooper <yanefbsd@gmail.com> To: Mario Lobo <lobo@bsd.com.br> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: SUJ Changes Message-ID: <AANLkTinrCnHilBHtvh5G2UU6yOiYExV2HPZtPVL97Mm9@mail.gmail.com> In-Reply-To: <201005262159.27350.lobo@bsd.com.br> References: <alpine.BSF.2.00.1005171616390.1398@desktop> <AANLkTikBdkw5NlrGib1Qq3QASfQk2kXPHU4N0AyxGviN@mail.gmail.com> <AANLkTinMJN2awQw7W_PWCPbG-dt8obHBacnd9KUcRdY1@mail.gmail.com> <201005262159.27350.lobo@bsd.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 26, 2010 at 2:59 PM, Mario Lobo <lobo@bsd.com.br> wrote: > On Wednesday 26 May 2010 23:56:24 Garrett Cooper wrote: >> On Wed, May 26, 2010 at 3:52 PM, Marcelo/Porks <marcelorossi@gmail.com> > wrote: >> > On 5/25/10, Marcelo/Porks <marcelorossi@gmail.com> 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) warnx("%s remains unchanged as disabled", name); else { >> > + =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 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 <blah> >> 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. >> > Is this available in 8-STABLE? Nope. > Can it be? Not sure (fs@ folks should make the call), but definitely not before 8.= 1. > Can this be activated on my current installation without loosing data? I suggest looking for SUJ in the current archives in the past 2 months. There are a number of threads that discuss how SUJ should be enabled. HTH, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinrCnHilBHtvh5G2UU6yOiYExV2HPZtPVL97Mm9>