Subject: Re: FFS byteswapping
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Luke Mewburn <>
List: tech-kern
Date: 10/25/2001 12:01:38
On Wed, Oct 24, 2001 at 05:12:26PM -0400, der Mouse wrote:
> fsck_ffs coredumped on me today.  On investigating, there appear to be
> two bugs (setup.c expects ffs_sb_swap to work when the old and new sb
> pointers are equal, and ffs_sb_swap mistakenly uses
> ufs_rw32(n->...,ns).)
> Now, the files I'm working with are
> /*	$NetBSD: setup.c,v 1.37 1999/11/15 19:18:26 fvdl Exp $	*/
> /*	$NetBSD: ffs_bswap.c,v 1.7 2000/01/18 18:41:29 bouyer Exp $	*/
> and I wouldn't even bother mentioning this except that it looks to me
> as though they haven't been fully fixed.

I noticed this problem a while ago, and fixed it in -current around
August 17, 2001.  You need at least rev 1.11 of ffs_bswap.c, and the
associated changes to fsck_ffs as well.

I hope to get a bunch of ffs fixes and enhancements pulled up into the
netbsd-1-5 branch sometime soon, including the FFS_EI fixes and new
ffs_dirpref() work.


Luke Mewburn  <>
Luke Mewburn     <>
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system