All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH 2/2] block: call blk_mq_exit_queue from disk_release for never added disks
Date: Thu, 21 Jul 2022 20:07:11 +0800	[thread overview]
Message-ID: <YtlBb3qQHM1Hg0hU@T590> (raw)
In-Reply-To: <20220720130541.1323531-2-hch@lst.de>

On Wed, Jul 20, 2022 at 03:05:41PM +0200, Christoph Hellwig wrote:
> To undo the all initialization from blk_mq_init_allocated_queue in case
> of a probe failure where add_disk is never called we have to call
> blk_mq_exit_queue from put_disk.
> 
> This relies on the fact that drivers always call blk_mq_free_tag_set
> after calling put_disk in the probe error path if they have a gendisk
> at all.
> 
> We should be doing this in general, but can't do it for the normal
> teardown case (yet) as the tagset can be gone by the time the disk is
> released once it was added.  I hope to sort this out properly eventually
> but for now this isolated hack will do it.
> 
> Fixes: 6f8191fdf41d ("block: simplify disk shutdown")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Reviewed-by: Ming Lei <ming.lei@redhat.com>

-- 
Ming


  reply	other threads:[~2022-07-21 12:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 13:05 [PATCH 1/2] blk-mq: fix error handling in __blk_mq_alloc_disk Christoph Hellwig
2022-07-20 13:05 ` [PATCH 2/2] block: call blk_mq_exit_queue from disk_release for never added disks Christoph Hellwig
2022-07-21 12:07   ` Ming Lei [this message]
2022-07-20 23:55 ` [PATCH 1/2] blk-mq: fix error handling in __blk_mq_alloc_disk Ming Lei
2022-07-21  5:03   ` Christoph Hellwig
2022-07-21  7:12     ` Ming Lei
2022-07-21 16:59 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtlBb3qQHM1Hg0hU@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.