Subject: ffs compatibility patches
To: None <tech-kern@netbsd.org>
From: Darrin B. Jewell <dbj@netbsd.org>
List: tech-kern
Date: 01/05/2004 16:17:23
I have developed ffs compatibility patches for fsck and the kernel
which I would like to commit shortly.  These patches should address
the recent ffs compatibility problems introduced with the addition
of ffsv2 to the NetBSD kernel.

I have introduced the '-c 4' option to fsck_ffs which performs
the superblock upgrade used by the current version of ffs.
Without this option, neither fsck nor the kernel will
automatically upgrade the superblock.

This should fix the corruption of apple ufs filesystems, and allow
a filesystem to be shared between netbsd 2.0 and netbsd 1.6 without
causing fsck problems for either.

Note that the patches restore the stricter alternate superblock
comparision used for un-upgraded filesystems.  Filesystems which are
upgraded with 'fsck_ffs -c 4' will allow a looser comparison of the
superblock to help enable future compatibility.  After these patches,
-current users who have a partially upgraded superblock that does not
yet use the new flags, will need to again run fsck_ffs -b 32.  This
should only affect -current kernel users.  Any users who are upgrading
from or downgrading to old released versions should have no problems
running the old or the new fsck on their filesystems.

The patches may currently be found in gnats in the following two prs:
  port-macppc/23925  "fsck_ffs corrupts APPLE_UFS filesystems"
  port-macppc/23926  "kernel APPLE_UFS support needs review"

These patches will also fix the problems discussed in these prs:
  kern/21404 "new kernel breaks file system for old kernels"
  kern/21283 "current FFS (not v2) incompatible with older NetBSD releases"

Darrin