Hello,
On Fri, Oct 26, 2012 at 02:03:45PM +0200, Bart Van Assche wrote:
> A block driver may start cleaning up resources needed by its
> request_fn as soon as blk_cleanup_queue() finished, so request_fn
> must not be invoked after draining finished.
Please be a lot more detailed. Please describe an example scenario
where things go wrong, explain why that's happening and how it's
fixed.
> +void inline __blk_run_queue_uncond(struct request_queue *q)
> +{
> + if (unlikely(blk_queue_dead(q)))
> + return;
> +
> + q->request_fn(q);
> +}
...
> @@ -510,6 +529,7 @@ void blk_cleanup_queue(struct request_queue *q)
> /* drain all requests queued before DYING marking */
> spin_lock_irq(lock);
> __blk_drain_queue(q, true);
> + queue_flag_set(QUEUE_FLAG_DEAD, q);
> spin_unlock_irq(lock);
And some comments explaining what the dead thing is doing would be
nice too; other than that, looks good to me.
Thanks!
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html