Re: [PATCH v1 4/5] block: null_blk: fix queue leak inside removing device

2013-12-31 Thread Jens Axboe
On Thu, Dec 26 2013, Ming Lei wrote: > When queue_mode is NULL_Q_MQ and null_blk is being removed, > blk_cleanup_queue() isn't called to cleanup queue, so the > queue allocated won't be freed. > > This patch calls blk_cleanup_queue() for MQ to drain all > pending requests first and release the ref

[PATCH v1 4/5] block: null_blk: fix queue leak inside removing device

2013-12-26 Thread Ming Lei
When queue_mode is NULL_Q_MQ and null_blk is being removed, blk_cleanup_queue() isn't called to cleanup queue, so the queue allocated won't be freed. This patch calls blk_cleanup_queue() for MQ to drain all pending requests first and release the reference counter of queue kobject, then blk_mq_free