Alignment of disk-I/O from userland.

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Oct 6 14:55:23 PDT 2003


In message <200310062146.h96Lkpx0093486 at khavrinen.lcs.mit.edu>, Garrett Wollman
 writes:

>I think that gives us plenary authority to require appropriate
>alignment of data buffers used to access disk devices directly.

Well, apart from us wedging or botching the request rather than
return a consistent error we're standards compliant then.

It has been mentioned on #thatchannel that busdma should take care
of this by copying the request as necessary.  Faced with the prospect
of a request several megabytes in size, I don't like the prospect
of malloc/bcopy too much.

All in all, I would advocate that we decide that disks in FreeBSD
are allowed to return ENXIO if they get insufficiently aligned
requests.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list