[Cbe-oss-dev] [PATCH] ps3rom: sector size should be 512 bytes
James Bottomley
James.Bottomley at HansenPartnership.com
Fri Feb 1 06:42:04 EST 2008
On Thu, 2008-01-31 at 10:44 -0800, Nicholas A. Bellinger wrote:
> > In short, and to repeat: almost every internal size counter to block is
> > in units of 512 byte sectors ... that includes capacity, maximum etc ...
> >
>
> Ok, after reading your followup with Geert I see that this looks like a
> bug in ps3rom.c assuming 2048 byte sectors to calculate .max_sectors
> (which was originally set to 32 as I mentioned). Using the setting
> BOUNCE_SIZE << 9 where BOUNCE_SIZE is the request size in bytes looks
> like this will solve the issue. My misunderstanding was
> that .max_sectors was allowed to be calcuated in non 512 byte sectors,
> so please disregard my patch.
>
> Geert, .max_sectors for ps3rom.c using 512 byte sectors ends up being
> 128, yes.?
>
> James, could we put something in the SCSI docs stating that .max_sectors
> MUST be calculated against 512 byte sectors..?
If that "we" is royal, then certainly you're welcome to submit a patch
(just get Randy's ack). However, do take a look at the existing docs
first. Certainly the block layer seems to make this very clear:
/**
* blk_queue_max_sectors - set max sectors for a request for this queue
* @q: the request queue for the device
* @max_sectors: max sectors in the usual 512b unit
^^^^^^^^^^^^^^^^^^^^^^
*
* Description:
* Enables a low level driver to set an upper limit on the size of
* received requests.
**/
I suspect you just didn't read the docs anyway ... ?
James
More information about the cbe-oss-dev
mailing list