SCSI hiding geometry

Brad Staff bjstaff at zds-ux.UUCP
Thu Mar 15 00:33:39 AEST 1990


What critical item did I miss in the discussion about SCSI-2 devices
sorting their work lists?  As near as I can tell, disk drivers (System
V/386 3.2 at least) do this all the time.  In fact, the System V kernel
provides a routine, disksort(), for this very purpose!

After looking around in os/bio.c, I found three routines the kernel
uses for writing buffers to disk:  bwrite(), bdwrite(), and bawrite().
bwrite() initiates the write by calling strategy() on the buffer, and
then waits for the write to complete by calling iowait() on the buffer.
bdwrite() sets the B_DELWRI and B_DONE flags in the buffer and then
releases it.  It will be written out at some later time.
bawrite() initiates the write by calling strategy() on the buffer, but
doesn't wait for the write to complete.

When the System V kernel really cares about the order of writes, it uses
bwrite().  Otherwise, it might use bdwrite() or bawrite().  I don't see
any problem here.
-- 
Brad Staff               |
Zenith Data Systems      | "A government that can forbid certain
616-982-5791             |  psychoactive drugs can mandate others."
...!uunet!zds-ux!bjstaff |	- Russell Turpin



More information about the Comp.unix.aix mailing list