Linux block layer
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>,
	yukuai <yukuai3@huawei.com>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [PATCH] block: fix "Directory XXXXX with parent 'block' already present!"
Date: Thu, 21 Apr 2022 09:09:01 -0700	[thread overview]
Message-ID: <YmGBnbYByitxF3UW@infradead.org> (raw)
In-Reply-To: <20220421083431.2917311-1-ming.lei@redhat.com>

On Thu, Apr 21, 2022 at 04:34:31PM +0800, Ming Lei wrote:
> q->debugfs_dir is used by blk-mq debugfs and blktrace. The dentry is
> created when adding disk, and removed when releasing request queue.
> 
> There is small window between releasing disk and releasing request
> queue, and during the period, one disk with same name may be created
> and added, so debugfs_create_dir() may complain with "Directory XXXXX
> with parent 'block' already present!"
> 
> Fixes the issue by moving debugfs_create_dir() into blk_alloc_queue(),
> and the dir name is named with q->id from beginning, and switched to
> disk name when adding disk, and finally changed to q->id in disk_release().

Is there any good reason to not just debugfs_remove_recursive in
blk_unregister_queue and do away with all the renaming?

  parent reply	other threads:[~2022-04-21 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  8:34 [PATCH] block: fix "Directory XXXXX with parent 'block' already present!" Ming Lei
2022-04-21 12:02 ` Shinichiro Kawasaki
2022-04-21 16:09 ` Christoph Hellwig [this message]
2022-04-22  3:01   ` Ming Lei
2022-04-22  6:05     ` Christoph Hellwig
2022-04-22  6:43       ` Ming Lei
2022-04-21 16:37 ` Dan Williams
2022-04-21 17:28 ` Hannes Reinecke
2022-04-22  1:23   ` yukuai (C)
2022-04-22  2:52     ` Ming Lei
2022-04-21 20:54 ` kernel test robot
2022-04-21 23:06 ` kernel test robot

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=YmGBnbYByitxF3UW@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=dan.j.williams@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=yukuai3@huawei.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