Re: [PATCH v2] dm init: add dm-mod.waitfor to wait for asynchronously probed block devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Mike" == Mike Snitzer <snitzer@xxxxxxxxxx> writes:

Hi,

 >> As mentioned,
 >> https://lore.kernel.org/all/20220406154631.277107-1-fabio.aiuto@xxxxxxxxxxxxxxxxxxxx/
 >> 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 <drzeus-list@xxxxxxxxx>
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".

    [bunk@xxxxxxxxx: root_wait can become static]
    Signed-off-by: Pierre Ossman <drzeus@xxxxxxxxx>
    Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
    Cc: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

-- 
Bye, Peter Korsgaard

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux