Hello, On Wed, Nov 28, 2012 at 01:53:58PM +0100, Bart Van Assche wrote: > The function scsi_remove_host() may get invoked concurrently with > scsi_request_fn(). Kill those I/O requests for which processing > starts after scsi_remove_host() has been invoked. This makes > device removal a little quicker by avoiding that such SCSI > commands time out. ... > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index f3d6e0d..5fe25b3 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -1549,7 +1549,8 @@ static void scsi_request_fn(struct request_queue *q) > if (!req || !scsi_dev_queue_ready(q, sdev)) > break; > > - if (unlikely(!scsi_device_online(sdev))) { > + if (unlikely(!scsi_device_online(sdev) || > + !scsi_host_scan_allowed(shost))) { > sdev_printk(KERN_ERR, sdev, > "rejecting I/O to offline device\n"); > scsi_kill_request(req, q); I don't know. This feels a bit weird to me. Shouldn't we instead make sure that scsi_device_onilne() test fails once host removal is initiated? Thanks. -- tejun -- 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