Re: [PATCH block/for-linus] block: blk-throttle should be drainedregardless of q->elevator

From: Tejun Heo
Date: Mon Feb 13 2012 - 18:41:12 EST


Hello,

On Mon, Feb 13, 2012 at 06:27:42PM -0500, Vivek Goyal wrote:
> > - /*
> > - * Drain all requests queued before DEAD marking. The caller might
> > - * be trying to tear down @q before its elevator is initialized, in
> > - * which case we don't want to call into draining.
> > - */
> > - if (q->elevator)
> > - blk_drain_queue(q, true);
> > + /* drain all requests queued before DEAD marking */
>
> We have already marked the queue DEAD before we start draining the queue.
> May be we need to fix the comment.

Hmmm... it actually is correct. It drains all requests which were
queued before the preceding DEAD marking. ie... it's describing the
following.

1. requests queued
2. mark q DEAD
3. drain requests which were queued before #2. We don't care
about requests queued after #2.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/