On Thu, Dec 01 2022 at 11:38P -0500,
Peter Korsgaard <[email protected]> wrote:

> >>>>> "Mike" == Mike Snitzer <[email protected]> writes:
> 
> Hi,
> 
>  >> As mentioned,
>  >> 
> https://lore.kernel.org/all/[email protected]/
>  >> is an alternatively (less nice) approach to solve the same issue, so yes
>  >> - It is useful and needed.
> 
>  > OK, so it should be easy for others to say so, right?
> 
> Yes. Fabio, you pointed me to the earlier patch, so you presumably need
> something like this as well, right?
> 
> 
>  > My hesitation is that it feels like something that could be papering
>  > over device specific issues with their async initialization?  Even if
>  > that is the case, it'd be nice to know _why_ this change is needed.
>  > IMHO, the patch header stops short of offering compelling and informed
>  > justification.
> 
> Well, it is exactly like the rootwait option we have for normal (non-dm)
> root= handling, so it is for the same use cases / issues.
> 
> A lot of embedded / non-initramfs setups use rootwait today because of
> the async initialization logic. If those setups want to use root-on-dm
> (E.G. for dm-verity) then they need to use this dm_mod.waitfor= instead
> of rootwait.
> 
> rootwait was added by:
> 
> commit cc1ed7542c8c26af0f501da8006b9fce03e9aaca
> Author: Pierre Ossman <[email protected]>
> Date:   Sun Jul 15 23:40:35 2007 -0700
> 
>     init: wait for asynchronously scanned block devices
> 
>     Some buses (e.g.  USB and MMC) do their scanning of devices in the
>     background, causing a race between them and prepare_namespace().  In order
>     to be able to use these buses without an initrd, we now wait for the 
> device
>     specified in root= to actually show up.
> 
>     If the device never shows up than we will hang in an infinite loop.  In
>     order to not mess with setups that reboot on panic, the feature must be
>     turned on via the command line option "rootwait".
> 
>     [[email protected]: root_wait can become static]
>     Signed-off-by: Pierre Ossman <[email protected]>
>     Cc: Al Viro <[email protected]>
>     Cc: Christoph Hellwig <[email protected]>
>     Signed-off-by: Adrian Bunk <[email protected]>
>     Signed-off-by: Andrew Morton <[email protected]>
>     Signed-off-by: Linus Torvalds <[email protected]>

OK, I'll accept your patch, but will tweak the DMINFO slightly to look
more like rootwait's pr_info (e.g. "Waiting for device %s..." and such).

I'll also change the msleep(20) to msleep(5) like was introduced with
commit 39a0e975c37de ("init: reduce rootwait polling interval time to
5ms") -- checkpatch be damned. ;)

Thanks,
Mike

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

Reply via email to