linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yi Zhang <yi.zhang@redhat.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: linux-block <linux-block@vger.kernel.org>,
	Bruno Goncalves <bgoncalv@redhat.com>,
	skt-results-master@redhat.com
Subject: Re: [bug report] WARNING: CPU: 109 PID: 739473 at block/blk-stat.c:218 blk_free_queue_stats+0x3c/0x80
Date: Tue, 26 Oct 2021 18:10:00 +0800	[thread overview]
Message-ID: <CAHj4cs9YqxNv0HVtjBWay6hvhPn2Q71SS+iLq+taJe=g9feKvA@mail.gmail.com> (raw)
In-Reply-To: <YXdWx2oDmKJBRsBa@T590>

Hi Ming

The warning was fixed, thanks.

On Tue, Oct 26, 2021 at 9:16 AM Ming Lei <ming.lei@redhat.com> wrote:
>
> On Tue, Oct 19, 2021 at 12:13:22PM +0800, Yi Zhang wrote:
> > Hello
> > Below WARNING was triggered with blktests block/001 on ppc64le/aarch64
> > during CKI tests, pls help check it, thanks.
> >
> >   Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
> >             Commit: b199567fe754 - Merge branch 'for-5.16/bdev-size'
> > into for-next
> >
>
> Hello Yi,
>
> Can you try the following patch?
>
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 80943c123c3e..45143af78d90 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -589,16 +589,6 @@ void del_gendisk(struct gendisk *disk)
>          * Prevent new I/O from crossing bio_queue_enter().
>          */
>         blk_queue_start_drain(q);
> -       blk_mq_freeze_queue_wait(q);
> -
> -       rq_qos_exit(q);
> -       blk_sync_queue(q);
> -       blk_flush_integrity();
> -       /*
> -        * Allow using passthrough request again after the queue is torn down.
> -        */
> -       blk_queue_flag_clear(QUEUE_FLAG_INIT_DONE, q);
> -       __blk_mq_unfreeze_queue(q, true);
>
>         if (!(disk->flags & GENHD_FL_HIDDEN)) {
>                 sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
> @@ -621,6 +611,18 @@ void del_gendisk(struct gendisk *disk)
>                 sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk)));
>         pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);
>         device_del(disk_to_dev(disk));
> +
> +       blk_mq_freeze_queue_wait(q);
> +
> +       rq_qos_exit(q);
> +       blk_sync_queue(q);
> +       blk_flush_integrity();
> +       /*
> +        * Allow using passthrough request again after the queue is torn down.
> +        */
> +       blk_queue_flag_clear(QUEUE_FLAG_INIT_DONE, q);
> +       __blk_mq_unfreeze_queue(q, true);
> +
>  }
>  EXPORT_SYMBOL(del_gendisk);
>
>
>
> --
> Ming
>


-- 
Best Regards,
  Yi Zhang


      reply	other threads:[~2021-10-26 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  4:13 [bug report] WARNING: CPU: 109 PID: 739473 at block/blk-stat.c:218 blk_free_queue_stats+0x3c/0x80 Yi Zhang
2021-10-22  5:29 ` Yi Zhang
2021-10-25 11:02   ` [bug report][bisected] " Yi Zhang
2021-10-25 14:02     ` Jens Axboe
2021-10-26  8:35       ` Christoph Hellwig
2021-10-26 10:06         ` Yi Zhang
2021-10-26  1:15 ` [bug report] " Ming Lei
2021-10-26 10:10   ` Yi Zhang [this message]

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='CAHj4cs9YqxNv0HVtjBWay6hvhPn2Q71SS+iLq+taJe=g9feKvA@mail.gmail.com' \
    --to=yi.zhang@redhat.com \
    --cc=bgoncalv@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=skt-results-master@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;
as well as URLs for NNTP newsgroup(s).