Subject: Re: kern/37000: Solaris ufs filesystems not supported
To: None <gnats-bufs@netbsd.org, netbsd-bugs@netbsd.org, martin@duskware.de>
From: Antti Kantee <pooka@cs.hut.fi>
List: netbsd-bugs
Date: 09/25/2007 02:52:20
On Mon Sep 24 2007 at 18:20:03 +0000, Antti Kantee wrote:
> This is because the Solaris superblock format is kind enough to have a
> few fields in different places. You can mount and use your file system
> image with this change:
>
> Index: fs.h
> ===================================================================
> RCS file: /cvsroot/src/sys/ufs/ffs/fs.h,v
> retrieving revision 1.47
> diff -p -u -r1.47 fs.h
> --- fs.h 24 Sep 2007 16:20:50 -0000 1.47
> +++ fs.h 24 Sep 2007 18:13:45 -0000
> @@ -348,9 +348,9 @@ struct fs {
> int32_t fs_maxsymlinklen; /* max length of an internal symlink */
> int32_t fs_old_inodefmt; /* format of on-disk inodes */
> u_int64_t fs_maxfilesize; /* maximum representable file size */
> + int32_t fs_state; /* validate fs_clean field (UNUSED) */
> int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */
> int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */
> - int32_t fs_state; /* validate fs_clean field (UNUSED) */
> int32_t fs_old_postblformat; /* format of positional layout tables */
> int32_t fs_old_nrpos; /* number of rotational positions */
> int32_t fs_spare5[2]; /* old fs_postbloff */
>
> For as how to detect and fix this, I don't know.
Actually, coming to think of it, why don't we just always form fs_qbmask
from fs_bmask (same for fmask) at runtime? Is there any case where they
are not expected to be consistent? Why's qbmask on-disk anyway?
--
Antti Kantee <pooka@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"la qualité la plus indispensable du cuisinier est l'exactitude"