Subject: 1024 Byte Sectors

From: Julian H Stacey <[email-masked]>

Mark Gooderum <[email-masked]> wrote:
> Is there anything funky with using a disk w/1024 byte sectors?

Have you considered reformatting it to 512 ?
--
Julian Stacey <[email-masked]>

---

From: Julian H Stacey <[email-masked]>

Mark Gooderum <[email-masked]> wrote:
> Yes...the answer is partly I don't know that these drives support it and
> I don't have any tool that lets me try.
Use the BIOS on the SCSI controller card of your iPC (If your running an x86)

I was once sold a Seagate 1G scsi disk formatted as 1K, & did exactly that.

---

From: Mark Gooderum <[email-masked]>

Yes...the answer is partly I don't know that these drives support it and
I don't have any tool that lets me try.  The other is that there are
valid reasons for having larger sectors, and a Unix only disk at least
should be able to support it.

In the meanwhile...I have it working.  I've made Micheal Hitch's patch
to sd.c (which have it look for B_RAW as a clue on whether to do the
block readjustment).

I've fixed bounds_check_with_label() to similarly adjust it's check 
based on this flag (again based on Micheal's Amiga version to do the
same).

Finally, I've gotten the read/writedisklabel() to work so that they 
read and write the label consistenly and don't break reading a 512 byte
p/sector disk label.

It is the last bit that's holding me up though.  I realized last night 
that my patch (to me) seems wrong, but it works.  The B_RAW flag now also
implies (to sd.c) convert blocks from DEV_BSIZE blocks to the drive's
block size.  However, I've changed the arithmatic in read/writedisklabel()
to use the physical block size, so this seems mismatched, but it works.
If I try to do the patch the right way (back out the B_RAW flags), it breaks.

My guess is that the arithmatic fixes I made allow the basic read/write
to work.  I suspect that part of the problem was that the disklabel
code was trying to read and write in single 512 byte pieces before, and
it now at least does it's I/O in 1024 byte chunks.

Also, writing the disklabel with "-w -B" still trashes the label, while
"-R -B" or "-R -r" works.  I suspect that the disklabel program still needs
some fixes for writing the boot program.

However, I'm making progress and should have it working in a couple of days,
at which point I'll post the patches for testing by others and send them
in for consideration.

Note that these patches are effectively safe for 512 byte disks and things
like the wd driver because with 512 byte disks it really doesn't matter
which block arithmatic you use, you get the same results.  

IDE/ESDI/STxxx drives can only be 512 byte per sector, so that's a non issue.
Also, I'm not making any effort for this to work with a DOS partitioned drive,
since DOS and BIOS don't support non 512 byte p/sector drives.

-Mark