On Mon, May 11, 2015 at 12:58:03PM +0200, Bart Van Assche wrote: > What I'm wondering about is whether it will be possible with the above > approach to trigger path failover before (2 * SCSI timeout) has expired ? > Starting SCSI error handling immediately after the block layer has reported > the first SCSI timeout is only safe if all ongoing SCSI commands are > canceled in some way. Is this what the function blk_abort_request() is > intended for ? As far as I can see invoking that function or any function > with a similar purpose is only safe after the queuecommand() callback > function has finished. However, blk_mq_run_hw_queue() invokes > mq_ops->queue_rq() without holding any lock. So it's not clear to me how to > safely cancel ongoing blk-mq requests without waiting until these have timed > out. I hope that this means that overlooked something ? For the blk-mq case invoking it earlier should be fine - the REQ_ATOM_STARTED and REQ_ATOM_COMPLETE bit ops are specifily designed so that calling the timeout handler on any request is fine. I'm not sure about the !blk-mq case, though. -- 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