From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>
Subject: Re: [PATCH] blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created
Date: Tue, 12 Jul 2022 09:50:59 +0800 [thread overview]
Message-ID: <YszTg0GAQrOa96UX@T590> (raw)
In-Reply-To: <4c5f332f-ccd4-5d0e-14d4-bccf57bcd7cc@acm.org>
On Mon, Jul 11, 2022 at 10:20:39AM -0700, Bart Van Assche wrote:
> On 7/11/22 02:08, Ming Lei wrote:
> > blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues
> > when gendisk isn't added yet, such as nvme tcp.
> >
> > Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!'
> > which can be observed reliably when running blktests nvme/005.
> >
> > Reported-by: Yi Zhang <yi.zhang@redhat.com>
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> > block/blk-mq-debugfs.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> > index b80fae7ab1d9..28adb01f6441 100644
> > --- a/block/blk-mq-debugfs.c
> > +++ b/block/blk-mq-debugfs.c
> > @@ -728,6 +728,9 @@ void blk_mq_debugfs_register_hctx(struct request_queue *q,
> > char name[20];
> > int i;
> > + if (!q->debugfs_dir)
> > + return;
> > +
> > snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
> > hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
>
> Does this patch need a Fixes: tag?
Yeah,
Fixes: 6cfc0081b046 ("blk-mq: no need to check return value of debugfs_create functions")
>
> Additionally, as one can see here, I reported this bug before Yi:
> https://bugzilla.kernel.org/show_bug.cgi?id=216191
Sorry for missing your report, and I am fine to add your reported-by.
Thanks,
Ming
next prev parent reply other threads:[~2022-07-12 1:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 9:08 [PATCH] blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created Ming Lei
2022-07-11 10:10 ` Christoph Hellwig
2022-07-11 10:44 ` Yi Zhang
2022-07-11 13:57 ` Jens Axboe
2022-07-11 17:20 ` Bart Van Assche
2022-07-12 1:50 ` Ming Lei [this message]
2022-07-12 19:52 ` Bart Van Assche
2022-07-12 20:00 ` 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=YszTg0GAQrOa96UX@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).