Re: 2 questions about SCSI initialization

Pete Zaitcev
2002-03-22T01:44:48Z

> Date: Thu, 21 Mar 2002 17:27:55 -0800
> From: Patrick Mansfield <patmans@us.ibm.com>

> The same problem exists in scsi_unregister_host, where it checks
> GET_USE_COUNT(SDpnt->host->hostt->module). It looks like we would
> hit this with sd and scsi built into the kernel, and an insmod
> of an adapter that hits a scsi_build_commandblocks failure. Correct?

I saw that too, but I am less enthusiastic about it for selfish
reasons: no bug is filed against me. There's also one more small
thing: for a host such a check _may_ make some sense.
Target drivers interface file system from their top, so they
get their module usage incremented (and from there, they may
safely increment their usage more if they, say, have outstanding
commands, as Doug explained previously). This is not the case with
host adapter drivers. I simply do not have a complete analysis.
Obviously, the code is broken, but I do not know how to fix it.

All that code is a hell on Earth, I tell you. I am happy that
Marcelo accepted my "detected" counters, but I think that in a
year someone will step into the very same trap with 2.6. Whole
SCSI needs an overhaul. Wanna be Andre Hendriks of SCSI?

-- Pete