Re: [RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

2012-05-23 Thread Asias He
On 05/22/2012 11:14 PM, Tejun Heo wrote: Hello, On Tue, May 22, 2012 at 03:30:37PM +0800, Asias He wrote: On 05/21/2012 11:42 PM, Tejun Heo wrote: 1) if the queue is stopped, q->request_fn() will never call called. we will be stuck in the loop forever. This can happen if the remove method is ca

Re: [RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

2012-05-22 Thread Tejun Heo
Hello, On Tue, May 22, 2012 at 03:30:37PM +0800, Asias He wrote: > On 05/21/2012 11:42 PM, Tejun Heo wrote: > 1) if the queue is stopped, q->request_fn() will never call called. > we will be stuck in the loop forever. This can happen if the remove > method is called after the q->request_fn() calls

Re: [RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

2012-05-22 Thread Asias He
On 05/21/2012 11:42 PM, Tejun Heo wrote: On Mon, May 21, 2012 at 05:08:29PM +0800, Asias He wrote: When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would n

Re: [RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

2012-05-21 Thread Tejun Heo
On Mon, May 21, 2012 at 05:08:29PM +0800, Asias He wrote: > When user hot-unplug a disk which is busy serving I/O, __blk_run_queue > might be unable to drain all the requests. As a result, the > blk_drain_queue() would loop forever and blk_cleanup_queue would not > return. So hot-unplug will fail.

[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

2012-05-21 Thread Asias He
When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would not return. So hot-unplug will fail. This patch adds a callback in blk_drain_queue() for low lever dri