Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 May 1997 16:17:24 -0600
From:      "Justin T. Gibbs" <gibbs@plutotech.com>
To:        Bruce Evans <bde@zeta.org.au>, sos@freefall.FreeBSD.ORG
Cc:        freeBSD-arch@FreeBSD.org, freeBSD-scsi@FreeBSD.org
Subject:   Re: cvs commit: src/sys/scsi sd.c 
Message-ID:  <199705012119.PAA20788@pluto.plutotech.com>
In-Reply-To: Your message of "Fri, 02 May 1997 06:23:21 %2B1000." <199705012023.GAA24197@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
Moved to FreeBSD-scsi and FreeBSD-arch which are more appropriate.

>The != 512byte sector support breaks at least EOF handling.  (dscheck()
>rewrites both bp-b_resid and bp->b_bcount for transfers that cross the
>end of the partition, but the != 512byte sector support does extra work
>to prevent the change to bp->b_bcount.  I think it does this prevent
>truncation giving a count that isn't a multiple of sec_blk_ratio.  I think
>the count is always a multiple except for misconfigured partitions.
>Partition sizes currently need to be multiples of sec_blk_ratio to
>prevent this.  Partition sizes should really be in units of sectors.)
>
>Bruce

We need to really think about how we want to handle media with block
sizes greater than DEV_BSIZE.  Some questions to answer are:

1) What should sd and other devices drivers "see" by the time they receive
the I/O?  Should b_blkno always be in terms of the logical block size of
the device or should the device driver be responsible for scaling?

I personally don't like the fact that every device driver has to do this
conversion.  Code duplication is error prone.

2) If we decide that it really should be in terms of the logical block size
of the device, what consequences does this have on information in the 
disklabel and how it's used by other areas of the kernel?

3) What features do we want to support?  Do we want to support the ability
to 'dd' an image from a 512byte sectored device to a 1k sectored device
and have it work?  If so, what constraints are needed?  (disklabel has
the larger block size even on the smaller sector sized disk? or is it just
that your frag and fs block sizes need to be in sync?)

4) If we want to have partitions with the only constraint being that they 
begin and end on a sector boundary, what else in the system needs to change
to allow this?  How does this affect 2 and 3?

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705012119.PAA20788>