Subject: Re: NetBSD 3.1 on a Powerbook 180
To: None <port-mac68k@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-mac68k
Date: 05/27/2007 22:18:57
I wrote:

> It seems recent kernels no longer support too old filesystems.
 :
> So I guess it's better to update the Mkfs tool for MacOS
> rather than adding complicated hacks to our ffs code.

After some printf debug, it turns out that
the problem is not so complicated.

Could anyone try the following patch or 3.1_STABLE kernel?

http://www.ceres.dti.ne.jp/~tsutsui/netbsd/netbsd-mac68k-GENERIC-3.1_STABLE-ffsfix.gz

---
Index: sys/ufs/ffs/ffs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.199
diff -u -r1.199 ffs_vfsops.c
--- sys/ufs/ffs/ffs_vfsops.c	17 May 2007 07:26:23 -0000	1.199
+++ sys/ufs/ffs/ffs_vfsops.c	27 May 2007 12:09:47 -0000
@@ -1081,14 +1081,14 @@
 	}
 
 	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
-		ump->um_maxfilesize = (u_quad_t) 1LL << 39;
+		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
 	}
 
 	maxfilesize = (u_int64_t)0x80000000 * fs->fs_bsize - 1;
-	if (ump->um_maxfilesize > maxfilesize)
-		ump->um_maxfilesize = maxfilesize;
+	if (fs->fs_maxfilesize > maxfilesize)
+		fs->fs_maxfilesize = maxfilesize;
 
 	/* Compatibility for old filesystems */
 	if (fs->fs_avgfilesize <= 0)

---
Izumi Tsutsui