Re: BUG: CD driver sends command during host removal

James Bottomley
2004-10-11T21:15:26Z

On Mon, 2004-10-11 at 15:40, Mike Anderson wrote:
> > This is the remove implies cancel issue that was discussed earlier. I
> > thought the proposal was to have a remove that wouldn't automatically
> > cancel all the commands? ... although I don't think I've seen any code
> > for that case yet.
> >
>
> Clarification. James, are you indicating that there needs to be a new
> scsi mid api that performs similar function to scsi_remove_host expect
> does not cancel commands?

Sorry, by "a remove that .." I was meaning "another remove method that
..."

> If is unclear to me if a LLDD provides a slave_destroy which is called
> from scsi_remove_device during the scsi_forget_host function that we
> would hit a case where the LLDD has good IO to complete still
> outstanding when we complete scsi_forget_host and call scsi_host_cancel.

That depends what the LLD does with the slave destroy really. The API
doesn't say the LLD has to chase all I/Os down when slave destroy is
called, so we can't assume it has.

> Is there some locking / synchronization issue with our state changes and
> the scsi_prep_fn / scsi_request_fn / scsi_dispatch_cmd sequence?

In the device, no ... I still need to check the host.

James