Subject: Re: FFS byteswapping
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Luke Mewburn <>
List: tech-kern
Date: 10/25/2001 13:39:02
On Wed, Oct 24, 2001 at 11:31:33PM -0400, der Mouse wrote:
> >> Am I hallucinating, or is there still a bug here?  ISTM that
> >> ufs_sb_swap should be caching pre-swap copies of cpc and nrpos same
> >> as it does postbloff and postblfmt.
> Actually, when I went to fix this, I noticed that it can be fixed
> perhaps more simply by just moving the computation of n16, o16, and len
> up to before the byteswapping starts.

Even better. I'll take this on board.

> This does seem to me to raise an issue, though: if fs_postbloff, but
> nothing else, is garbaged, fsck_ffs can coredump.  ISTM fsck_ffs should
> _never_ coredump due to filesystem damage.  (Even if you agree
> philosophically, it's not clear this is actually worth worrying about.)

I'm sure there's other stuff that could cause core dumps as well,
given a suitably borken file system :/.
Anyway, if this really an issue, we could validate postbloff before
doing swaps. Something to consider for the future...