Re: [PATCH] ublk_drv: fix request queue leak

Christoph Hellwig
2022-07-14T13:58:08Z

On Thu, Jul 14, 2022 at 09:37:10PM +0800, Ming Lei wrote:
> It is actually one big problem of 6f8191fdf41d ("block: simplify disk shutdown")
> since blk_put_queue() can't do what blk_cleanup_queue() did.
>
> Anywhere using blk_put_queue() to release blk-mq queue before adding
> disk has the same issue.

And the reason why blk_put_queue can't do is seems to be mostly because
queues don't hold a reference on the tag set (and tag_sets don't have
a reference at all). Which has caused us a bunch of issues before, so
let me see if I can fix that properly.