From: Christoph Hellwig <hch@lst.de>
To: Daniel Wagner <dwagner@suse.de>
Cc: Keith Busch <kbusch@meta.com>,
linux-block@vger.kernel.org, axboe@kernel.dk,
Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCHv2] block: fix leaking minors of hidden disks
Date: Mon, 10 Oct 2022 10:19:02 +0200 [thread overview]
Message-ID: <20221010081902.GA23270@lst.de> (raw)
In-Reply-To: <20221010080218.uqhkvryiipybxidd@carbon.lan>
On Mon, Oct 10, 2022 at 10:02:18AM +0200, Daniel Wagner wrote:
> Doesn't give me the same consistent result as with Keith's version:
That's because it is broken.. Try this version:
diff --git a/block/genhd.c b/block/genhd.c
index 514395361d7c5..2296ad422523a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -507,6 +507,8 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
*/
dev_set_uevent_suppress(ddev, 0);
disk_uevent(disk, KOBJ_ADD);
+ } else {
+ disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
}
disk_update_readahead(disk);
next prev parent reply other threads:[~2022-10-10 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 19:38 [PATCHv2] block: fix leaking minors of hidden disks Keith Busch
2022-10-10 6:43 ` Daniel Wagner
2022-10-10 6:51 ` Chaitanya Kulkarni
2022-10-10 7:36 ` Christoph Hellwig
2022-10-10 8:02 ` Daniel Wagner
2022-10-10 8:19 ` Christoph Hellwig [this message]
2022-10-10 8:49 ` Daniel Wagner
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=20221010081902.GA23270@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=dwagner@suse.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox