On 02/22/13 20:01, Jens Axboe wrote:
That'd be fine. I agree with Tejun that just returning is error prone
and could cause hard-to-debug hangs or stalls. So something ala
if (blk_queue(dead))
return;
else if (q->request_fn_active) {
blk_delay_queue(q, 0);
return;
}
would work. Alternatively, you could mark the queue as needing a re-run,
so any existing runner of it would notice and clear this flag and re-run
the queue. But that's somewhat more fragile, and since it isn't a
hot/performance path, I suspect the simple "just re-run me soon" is good
enough.
I'm worried that in the device mapper the approach using
blk_delay_queue() could trigger a queue run after the final dm_put().
And I'm also afraid that that approach could trigger several needless
context switches before q->request_fn_active finally drops to zero. So
the approach with the "need re-run" flag seems preferable to me. But
maybe I'm overlooking something ?
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html