blocks and issues non-block-aligned or non-block-sized requests
void sdi_blkio(buf_t *obp, unsigned int sshift, void (*strategy)())
sdi_blkio blocks requests which
are not on the sector boundary, or
which specify a
non-sector size, into sizes which can
be issued to the device.
Most disks and tapes will only except 512 byte
(or multiples of 512) size requests.
Some optical devices require 2048-byte blocks.
However, there are many
valid user operations that issue requests
which are less than the
device block size or are not a multiple of it.
temporary buffers to issue the needed requests, using
the target driver's
strategy routine to fulfill the user request.
Upon successful completion of the needed transfers,
signals completion of the user request.
pointer to the original buffer request
shift value needed to left-shift from blocks size to sectors size
pointer to the driver's strategy routine through which the
blocked requests will be issued
is typically used in a target driver's strategy routine.
The strategy routine checks the size and alignment of the request
for any nonaligned requests.
sdi_blkio is then called to
break the request up into valid
sector/block-aligned read or write
If the request is a write, the entire sector/block is read,
the portion requested is updated, and then the entire sector/block
When all the separate requests (needed to formulate the
original request) are completed, a call
is made to
to signal completion of the request.
If any portion of the
original request fails, a error result
is posted for the original
request, and the remaining requests are not issued.
Context and synchronization
x86/Pentium compatible architectures
using ddi: 4, 5, 5mp
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005