Subject: Re: Block Mail
To: None <,>
From: Mark Gooderum <>
List: current-users
Date: 08/29/1994 09:47:43
> > I would love to help make this work (I've got a couple of older but very
> > big 1024 block SCSI drives I scrounged that otherwise work).
> >  
> > I've played a bit with having physio() stuff the block value into both
> > b_lblkno and b_blkno.  
>   Here's a solution I'm trying right now.  I've been running in on my
> 512-byte sector disks with no problems.  It also seems to be working
> on an M-O disk using 1024-sectors.  Newfs and fsck work fine, and the
> filesystem can be mounted.
>   The physio() routine sets the B_RAW flag, and my change uses that flag
> to decide how to handle the b_blkno field.  [I.e. if B_RAW is set, then
> the b_blkno value is in DEV_BSIZE blocks, otherwise the b_blkno value is
> in real blocks.]  There are two changes - one to the SCSI disk driver
> (sd.c) and the other to the bounds_check_with_label() routine, since the
> meaning of b_blkno is different.  Note that the partition size must be
> in real blocks, not in DEV_BSIZE blocks;  newfs uses the real block size
> when calculating the file system size.
> Michael

I've made these changes.  The patch to sd.c and have similarly modified

With this done I can disklabel when running and can newfs and fsck
using the raw devices and then successfully mount and use the

On reboot the label "goes away".  If I relabel the disk in with the
same setup, the filesystems are there and unaffected, fsck okay and can
be mounted and used.  (I'm fudging slightly to be safe though, the
first filesystem doesn't start until the second cylinder).

I've played a little bit with writedisklabel() and readdisklabel() but
really haven't had much luck.  If I write the label, disklabel -r shows its
okay "on the disk", but after fails to read it.

I'm going to look at the first few blocks in the raw but some clues as to
what it should look like would be nice from someone more in the know.