>Agreed. Good point for the theory. But in practice, entering driver
>methods without any lock against the access method may lead to subtle
>races. At least Linux/SCSI hasn't this kind of races.
>Btw, I am not so sure about FreeBSD/CAM, for example. :-)

In any system, you have to deal with races involving a transaction
going up and down the stack at the same time or events that invalidate
a transaction while it is coming down.  In CAM this is dealt with by
having the controller driver assume ownership of a transaction while a
lock, that prevents the occurance of events that might invalidate
that transaction, is held.  During the process of assuming ownership,
the transaction is checked one last time to see if it was aborted.  If
not, transfer is complete.  Holding a lock across system boundaries
is a simpler way to deal with these kinds of races, but not nearly
as efficient as you trade a per-instance lock with a global one.

--
Justin
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to