tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clearing bogus journal

On Tue, Aug 18, 2009 at 10:12:39PM +0900, Izumi Tsutsui wrote:
> > > "unrecognized wapbl type" problem could happen as noted PR kern/39924,
> > > and in that case we should fix kernel to allow mount such fs readonly.
> > > (fsck_ffs(8) can fix it)
> > 
> > How ? In my case fsck_ffs (from 5.0.1) didn't fix anything. This is
> > what motivated my email.
> "unrecognized wapbl type" error is different from
> "unknown journal type" caused by fsck_ffs -c4 against old fs.

Yes, but both are severe errors that should be detected by fsck -p

> In the former case, fsck_ffs(8) complains
> but it also shows "CONTINUE?" prompt.

Yes, I've seen this. The problem is when we have bogus wapbl types or flags
but no FS_DOWAPBL in fs_flags. fsck_ffs doesn't check any wapbl fields
in the !FS_DOWAPBL case, yet the kernel will try to use them when
mounting read/write.

> > > it's better to provide some tools to fix it, but I have a feeling
> > > that such feature should be enabled by some explicit option.
> > > (I'm not sure if we will add other journal types in future though)
> > 
> > My idea was to have fsck_ffs check for it and abort the boot (just as
> > other severe problems noted by fsck_ffs -p).
> Okay, I agree adding a check for "unknown journal type" in fsck_ffs(8).
> (though we also have to fix kernel for root file system anyway)

Not sure, in my case the filesystem could be mounted read-only. It's when
trying to mount read/write that the error was detected.

> > It's better to abort the boot
> > than let it continue with the filesystems not mounted properly.
> Isn't it also better to have some option to "ignore/clear existing journal"
> in fsck_ffs(8)?

I'd say fsck should ask in non-preen mode, when a bogus journal is detected.

Manuel Bouyer, LIP6, Universite Paris VI.  
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index