sdi_blkio(D3I) sdi_blkio(D3I)
NAME
sdi_blkio - blocks and issues non-block-aligned or non-block-
sized requests
SYNOPSIS
#include <sys/sdi.h>
void sdi_blkio(buf_t *obp, unsigned int sshift, void (*strategy)())
Arguments
obp Pointer to the original buffer request.
sshift
Shift value needed to left-shift from blocks size to
sectors size.
strategy
Pointer to the driver's strategy routine through which
the blocked requests will be issued.
DESCRIPTION
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 which issue requests which are less
than the device block size or are not a multiple of it.
sdi_blkio uses 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,
sdi_blkio signals completion of the user request.
Return Values
None.
USAGE
sdi_blkio 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 requests. If the request is a write, the entire
sector/block is read, the portion requested is updated, and
then the entire sector/block is written. When all the
separate requests (needed to formulate the original request)
are completed, a call is made to biodone(D3) to signal
completion of the request. If any portion of the original
Copyright 1994 Novell, Inc. Page 1
sdi_blkio(D3I) sdi_blkio(D3I)
request fails, a error result is posted for the original
request, and the remaining requests are not issued.
Level
Base only.
REFERENCES
biodone(D3)
NOTICES
Applicability
sdi: 1
Copyright 1994 Novell, Inc. Page 2