Re: [PATCH UPDATED block/for-linus] block: blk-throttle should bedrained regardless of q->elevator

From: Vivek Goyal
Date: Wed Feb 15 2012 - 10:57:42 EST


On Mon, Feb 13, 2012 at 05:14:27PM -0800, Tejun Heo wrote:

[..]
> /*
> * This function might be called on a queue which failed
> - * driver init after queue creation. Some drivers
> - * (e.g. fd) get unhappy in such cases. Kick queue iff
> - * dispatch queue has something on it.
> + * driver init after queue creation or is not yet fully
> + * active yet. Some drivers (e.g. fd and loop) get unhappy
> + * in such cases. Kick queue iff dispatch queue has
> + * something on it and @q has request_fn set.
> */
> - if (!list_empty(&q->queue_head))
> + if (!list_empty(&q->queue_head) && q->request_fn)
> __blk_run_queue(q);

Is it not a BUG() condition. We have a queue which has some requests
in it and we don't have q->request_fn?

Thanks
Vivek
--
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/