.TH dmareq() "" "" "Internal Kernel Routine"
.PC "Request block I/O, avoiding DMA straddles"
.B "#include <sys/buf.h>"
\fBvoid dmareq(\fIbp\^\fB, \fIiop\^\fB, \fIdev\^\fB, \fIreq\^\fB)\fR
\fBBUF *\fIbp\^\fB; IO *\fIiop\^\fB; dev_t \fIdev\^\fB; int \fIreq\^\fB;\fR
.PP
.BR dmareq() ,
like \fBioreq()\fR,
queues an I/O request through the block routine of a device driver.
.I bp
points to the
.B BUF
structure for the I/O.
.I iop
points to an
.B IO
structure.
.I dev
is the device to access.
Finally,
.I req
requests the type of I/O:
it must be either
.B BREAD
or
.BR BWRITE .
.PP
.B dmareq()
converts I/O requests that straddle DMA boundaries
into two or three non-straddling requests.
It converts block DMA straddles into two non-straddling I/O requests;
it converts other DMA straddles into three non-straddling I/O requests,
where the DMA-straddling block is handled through the buffer cache.
Note that the driver's block routine must be able to function
with the smaller I/O requests.
.SH "See Also"
.B
ioreq(),
internal kernel routines
.R
