On 04/11/2012 01:17 PM, Mike Christie wrote: > For example FC drivers will call fc_remove_host which sets things up so > no new IO can be sent to the device after that function has completed > and will call some callouts like dev_loss_tmo_callbk to cleanup > outstanding IO. The problem is that when it calls scsi_remove_host that One correction. I meant to write scsi_target_remove above. fc_remove_host sets the rport state then calls rport_delete_work which then calls scsi_target_remove and it does callbacks like dev_loss_tmo_callbk and terminate_rport_io. So scsi_remove_host would not cause commands like sync cache to fail. That would be scsi_target_remove. By the time the driver calls scsi_remove_host the scsi_target_remove calls would have already removed the devices. Same thing happens though. Because fc_remove_host sets the rport state to FC_PORTSTATE_DELETED when scsi_remove_target removes the devices and the sd.c shutdown code is run, IO from that would get failed by the fc check ready function. > could cause commands like cache sync from sd.c's shutdown to get failed > (the queuecommand function will call the fc check ready function which > will fail the IO immediately). > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html