Hey, James. On Mon, Jun 25, 2012 at 10:14:49PM +0100, James Bottomley wrote: > > @@ -1490,11 +1489,7 @@ static void scsi_request_fn(struct request_queue *q) > > struct scsi_cmnd *cmd; > > struct request *req; > > > > - if (!sdev) { > > - while ((req = blk_peek_request(q)) != NULL) > > - scsi_kill_request(req, q); > > - return; > > - } > > That means that this hunk of code has to stay, but needs to be gated on > blk_queue_dead(q); there's still a race where this can occur. Wouldn't the scsi_device_online() check down below be enough? Block layer drain is gonna loop until all requests are done, so the looping is handled from block layer. 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