Subject: Re: Supporting sector size != DEV_BSIZE (fwd)
To: Konrad Schroder <perseant@hhhh.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/11/2002 17:28:47
At 02:21 PM 6/10/2002 -0700, Konrad Schroder wrote:
>If we had a mechanism for addressing filesystems that had been built with
>DEV_BSIZE=1024, we could mount old filesystems for systems that were built
>that way, and worked just fine when they were built; the NeXT comes to
>mind as a system that shipped with 1kB sectors.  Our FFS will currently
>mount 4.2-FFSes (read-only?) and dtrt;  if we change the filesystem(s)
>to understand different sector sizes than 512, we should be able to get
>these historical 1k-sector fss "for free".

I just happened to have a MO disk lying around that I had created using
NeXTSTEP 3.0/68k, so I decided to dump the first few sectors and see what
it looks like.  The first thing I found is that NeXT's disk label is at the
beginning of the disk (sector 0 byte 0), and the super-block starts at
sector 3 (byte offset 0x1800).  I've confirmed that NeXTSTEP sets
fs_fsbtodb and fs_nspf in terms of physical sector size / fragment size, so
my recent patches do the right thing in that respect.

One thing that concerns me is that NetBSD's ffs expects the super-block to
be at byte offset 0x2000, and I can't figure out where or if we look
differently when reading a NeXT file system.  Has anybody been able to
mount a NeXT/68k disk under NetBSD?  Also, if anyone has a 512-byte/sector
disk formatted by NeXT/68k, I'd like to know whether the super-block in
that case is also on sector 3 or at byte offset 0x1800.

-----------------------
Trevin Beattie          "Do not meddle in the affairs of wizards,
trevin@xmission.com     for you are crunchy and good with ketchup."
      {:->                                     --unknown