On Tue, Nov 18 2003, Patrick Mansfield wrote:
> On Tue, Nov 18, 2003 at 10:20:17AM -0500, Alan Stern wrote:
> 
> > Alignment to a 512-byte boundary would suffice and page alignment would be
> > more than enough.  The cleanest way to fix the problem would be to have st
> > and sg refuse to do direct I/O when the user's buffer isn't page aligned.  
> > That's probably too draconian (but it would allow us to give the user
> > process an appropriate error code right away).
> 
> The above restriction sounds reasonable to me, but I do not have
> experience in this area. I thought that the raw and direct block
> interfaces already had such restrictions.
> 
> Jens or Doug G can you comment on this?
> 
> You could add a scsi_host fields or bits specifying alignment
> restrictions, and enforce them as needed in upper level drivers.

The queue already has such a restriction embedded, see bio_map_user()
and queue_dma_alignment().

-- 
Jens Axboe



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to