On Wednesday 26 May 2010 7:56:24 pm Garrett Cooper wrote: > On Wed, May 26, 2010 at 3:52 PM, Marcelo/Porks <marcelorossi_at_gmail.com> wrote: > > On 5/25/10, Marcelo/Porks <marcelorossi_at_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 > > =================================================================== > > --- sbin/tunefs/tunefs.c (revision 208580) > > +++ sbin/tunefs/tunefs.c (working copy) > > _at__at_ -460,6 +460,14 _at__at_ > > 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 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'm not sure that really makes sense. As as you do any update to the filesystem the journal becomes out of date, and attempting to replay it could corrupt the filesystem. Instead, 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. -- John BaldwinReceived on Thu May 27 2010 - 12:02:11 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC