Subject: Re: Block Mail
To: None <osymh@gemini.oscs.montana.edu>
From: Mark Gooderum <gooderum@sctc.com>
List: current-users
Date: 08/27/1994 15:10:32
You gave me the clue I needed...

> That's probably because the bounds_check_with_label() is being called
> in sdstrategy() and being errored out before the I/O is even queued up.

Exactly...

I think I've got it, but I'll have to wait until this evening to play...

I added my block number massageing to sdstart(), however, the I/O first
calls sdstrategy() which calls bounds_with_check() *if* the disk isn't
the whole disk partition.  So dd's on and off /dev/rsdXd work...
but a newfs then goes to /dev/rsdXa or whatever, and goes though the 
bounds check.  In this case the request is still in logical block numbers, 
about 1,200,000 in my case, the disk is in physical sectors, no more
an 600,000...so it shows as off the end of the partition and returns
EINVAL.

I'll look at what the lblkno and blkno actually look like when they get
down to sd.c (and wd so I don't break anything) and adjust the hack
as appropriate (maybe add a flag instead...there's a few still available in
the buf flags field)...and move the fix up into sdstrategy().

So that should fix two of the three problems...now to get the disklabel code
to work (the disklabel gets updated okay in the kernel, but it doesn't
get out to the disk correctly because on boot the kernel again
complains it's gone).

I may actually get this working...scary...

-Mark


------------------------------------------------------------------------------