From: Chanho Min <chanho.min@lge.com>
To: Guillaume Gonnet <ggonnet.linux@gmail.com>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Benjamin Marzinski <bmarzins@redhat.com>,
dm-devel@schwermer.no, chanho.min@lge.com, jaeyuel.im@lge.com,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dm init: ensure device probing has finished in dm-mod.waitfor=
Date: Fri, 27 Mar 2026 13:33:57 +0900 [thread overview]
Message-ID: <acYItW3pCI99s2ab@BRUNHILD> (raw)
In-Reply-To: <DH6N0QM6764O.2CZNT5C8VH6Y1@gmail.com>
On Thu, Mar 19, 2026 at 10:05:46AM +0100, Guillaume Gonnet wrote:
> Hello Chanho,
>
> > This patch seems overly optimistic.
> > wait_for_device_probe() only waits for driver probe() callbacks to finish.
> > However, partition devices (e.g. /dev/mmcblk0p3) are often created
> > asynchronously after the parent disk probe has completed.
>
> This patch does work and fix the issue. I let you read my detailed
> explanation on how it does in my latest message on the mailing list:
> https://lore.kernel.org/dm-devel/DH6MMYX3TX5Y.R3N3IX6370ED@gmail.com/
>
> Basically, it replicates what was made for rootwait= argument, which has
> the same objectives but doesn't suffer from this issue.
Hi, Guillaume
I have verified that your patch does fix the issue I was seeing.
Given that blkdev_get_no_open() is no longer a public interface,
your approach seems to be the most suitable solution currently available.
Calling wait_for_device_probe() twice doesn't look particularly elegant,
but I can understand the reasoning behind it.
Reviewed-by: Chanho Min <chanho.min@lge.com>
Thanks
Chanho
>
> > The previous per-device polling loop was much more robust for dm-verity rootfs
> > use cases without an initramfs. Replacing it with a single call to
> > wait_for_device_probe() is likely a regression.
> > Instead, we should restore (and possibly improve) proper per-device waiting
> > using blkdev_get_no_open() in a loop until the actual partition appears.
> >
> > That said, Christoph also pointed out in the thread that dm-init is inherently
> > fragile, and the proper long-term solution is to use initramfs + udev.
>
> The blkdev_get_no_open() is an internal function of the block system.
> Christoph moved it out of public headers last year (see commit c632021).
> As you said, he is not a great fan of this dm-init wait mechanism so I'm
> pretty sure he won't let you make these functions public again. My patch
> does not depend of the block system at all, while still fixing the issue.
>
> Guillaume
prev parent reply other threads:[~2026-03-27 4:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 21:32 Guillaume Gonnet
2026-03-18 8:22 ` Peter Korsgaard
2026-03-18 9:25 ` Guillaume GONNET
2026-03-18 16:36 ` Mikulas Patocka
2026-03-18 17:57 ` Peter Korsgaard
2026-03-18 21:13 ` Mikulas Patocka
2026-03-19 8:47 ` Guillaume Gonnet
2026-03-19 10:53 ` Peter Korsgaard
2026-03-26 21:40 ` Francesco Valla
[not found] ` <abtakh4sU3HldDBB@BRUNHILD>
[not found] ` <DH6N0QM6764O.2CZNT5C8VH6Y1@gmail.com>
2026-03-27 4:33 ` Chanho Min [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=acYItW3pCI99s2ab@BRUNHILD \
--to=chanho.min@lge.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=dm-devel@schwermer.no \
--cc=ggonnet.linux@gmail.com \
--cc=jaeyuel.im@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@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
all inboxes | Powered by JetHome®