Re: IO buffer alignment for block devices

Saeed Bishara
2004-09-13T15:16:57Z

James Bottomley wrote:

>On Mon, 2004-09-13 at 08:48, Saeed Bishara wrote:
>
>
>> Is there any minimal alignment for the IO buffers (sg and single)
>>sent to a scsi LLD?
>> I found that buffers that come from buffer cache, page cache and sg
>>are page aligned , and the raw driver send sector aligned buffers.
>> so can I assume that the minimal alignment of the buffer is 512 bytes?
>>
>>
>
>You can assume it will be whatever you set blk_queue_dma_alignment() to
>in your slave configure routines. If the LLD doesn't set this, then it
>will be 8 bytes. However, beware, setting this higher can cause user
>
>
isn't the default 512, this is what I see in blk_queue_make_request.

<http://lxr.linux.no/ident?v=2.6.8.1;i=blk_queue_make_request>

>generated commands to be errored if they fail the alignment checks.
>
>James
>
>
>
any Ideas about lk 2.4?

>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
>