Re: [PATCH] fixes and cleanups for the new command allocation code

James Bottomley
2003-02-05T15:22:24Z

On Tue, 2003-02-04 at 23:15, Patrick Mansfield wrote:
> OK that sounds great, except we should not plug the queue since we
> have outstanding IO.

Yes, that's true. The guaranteed returning I/O will restart it.

> > And the slave_{alloc,configure,destroy} needs fixing too.
>
> What is broken?

This one, I'm not sure. The patch just drew my attention to the
breakage. The way I understand the API:

slave_alloc tells the LLD we're going to issue probes to the device
slave_configure tells the LLD we've probed it and we're now going to
configure and use it
slave_destroy tells the LLD we're no longer interested.

The patch removes the slave_configure call from scsi_slave_attach()
which is called by the upper level drivers. However, it looks like
scsi_add_lun always calls it.

The correct thing, I think, is not to call slave_configure until we're
sure an ULD is attaching (there's no point getting the LLD to allocate
resources to a command queue until we have an attachment).

James