DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

strategy(D2osdi)


strategy -- handle block device input and output

Synopsis

See strategy(D2oddi) for synopsis, arguments, return values, and context.

Usage

[This may be unnecessary. Is anything different for SCSI peripheral drivers?]

The logic is as follows:

  1. Check the configuration table for the device pointed to by bp->b_dev. If it is improper, set u.u_error to ENXIO and return.

  2. Check bp->b_blkno and, if less than zero, set b_flags to an error condition, call iodone(D3oddi) and return.

  3. Check that the I/O request is reasonable. If not, set an error condition, call iodone and return.

  4. Get an empty request block; sleep if necessary to obtain one.

  5. Call spl5(D3oddi) and then call disksort(D3oddi) to put the buffer pointed to by bp into the proper spot in the request queue.

  6. Call the start(D2oddi) entry point routine to start the request on the queue for the logical unit. When done, restore the previously set spl level and return.

Context and synchronization

context

Hardware applicability

All

Version applicability

osdi: 1, 2, 3, 4, 5 SCSI peripheral drivers.

Differences between versions

External dependencies

Drivers that contain a strategy( ) routine must have a b in the second column of the mdevice(F) file to indicate that it is a block device. The kernel expects a strategy( ) routine for every block driver that is configured.

References

print(D2osdi)

``OSDI SCSI driver interface version for SCO OpenServer 5'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005