public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, Yi Zhang <yi.zhang@redhat.com>,
	linux-block@vger.kernel.org, Chunguang Xu <brookxu.cn@gmail.com>
Subject: Re: [PATCH 1/4] blk-mq: add API of blk_mq_unfreeze_queue_force
Date: Thu, 15 Jun 2023 23:43:51 +0800	[thread overview]
Message-ID: <ZIsxt7Q2nmiLNTX2@ovpn-8-16.pek2.redhat.com> (raw)
In-Reply-To: <ZIsrSyEqWMw8/ikq@kbusch-mbp.dhcp.thefacebook.com>

On Thu, Jun 15, 2023 at 09:16:27AM -0600, Keith Busch wrote:
> On Thu, Jun 15, 2023 at 10:32:33PM +0800, Ming Lei wrote:
> > NVMe calls freeze/unfreeze in different contexts, and controller removal
> > may break in-progress error recovery, then leave queues in frozen state.
> > So cause IO hang in del_gendisk() because pending writeback IOs are
> > still waited in bio_queue_enter().
> 
> Shouldn't those writebacks be unblocked by the existing check in
> bio_queue_enter, test_bit(GD_DEAD, &disk->state))? Or are we missing a
> disk state update or wakeup on this condition?

GD_DEAD is only set if the device is really dead, then all pending IO
will be failed.

We need to try to handle these IOs first if device isn't set as dead by
calling blk_mark_disk_dead().

Thanks,
Ming



  reply	other threads:[~2023-06-15 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 14:32 [PATCH 0/4] nvme: fix two kinds of IO hang from removing NSs Ming Lei
2023-06-15 14:32 ` [PATCH 1/4] blk-mq: add API of blk_mq_unfreeze_queue_force Ming Lei
2023-06-15 15:16   ` Keith Busch
2023-06-15 15:43     ` Ming Lei [this message]
2023-06-16  5:48       ` Christoph Hellwig
2023-06-16  7:20         ` Ming Lei
2023-06-16  7:27           ` Christoph Hellwig
2023-06-16  7:33             ` Ming Lei
2023-06-20  5:41           ` Christoph Hellwig
2023-06-20 10:01             ` Sagi Grimberg
2023-06-20 13:15             ` Ming Lei
2023-06-15 14:32 ` [PATCH 2/4] nvme: add nvme_unfreeze_force() Ming Lei
2023-06-15 14:32 ` [PATCH 3/4] nvme: unfreeze queues before removing namespaces Ming Lei
2023-06-15 14:32 ` [PATCH 4/4] nvme: unquiesce io queues when " Ming Lei

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=ZIsxt7Q2nmiLNTX2@ovpn-8-16.pek2.redhat.com \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=brookxu.cn@gmail.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=yi.zhang@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox