unified I/O breakup routine
void buf_breakup(void (*strat)(buf_t *), buf_t *bp,
const bcb_t *bcbp)
buf_breakup is a generic buffer breakup routine
that modifies the original buffer header and/or
breaks the job into multiple pieces,
calling the strategy routine one or more times
(possibly with newly created buffer headers)
such that each call to the strategy routine satisfies
a set of constraints.
These constraints are specified by the buffer control block
pointed to by bcbp and described in
buf_breakup is capable of handling all types of buffers
that might be passed to a driver.
It supersedes other, more specific, breakup routines
Address of subordinate strategy routine.
Pointer to buffer header of buffer to be broken up.
Pointer to a
structure describing breakup constraints.
In DDI 8,
is called outside the driver, before the
entry point is called.
In DDI versions 7 and earlier,
buf_breakup is typically called in a block driver
which in turn is called indirectly through
from the driver's
The strat routine should consider each call as a separate
job, and should have no knowledge that an original buffer was
broken up into multiple pieces.
fields will be copied from the
original buffer header to any new buffer headers for each call
to strat, in case the driver uses them to pass information
into its lower-level routines:
Driver private data
Driver private data
Number of bytes not transferred
Context and synchronization
User or blockable
5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
Differences between versions
Drivers that conform to DDI versions prior to version 8
and that call the
function should set D_NOBRKUP and
D_BLKOFF in their
Even though D_BLKOFF is set,
the subordinate strategy routine, strat,
will not see a non-zero b_blkoff
if bcb_granularity is a multiple of NBPSCTR.
SCO OpenServer ODDI compatibility
ODDI drivers prior to version 3
function to breakup DMA I/O requests
function to breakup programmed I/O requests.
Beginning with ODDI version 3,
these functions are called for the driver by the
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005