• Peter Korsgaard's avatar
    dm init: add dm-mod.waitfor to wait for asynchronously probed block devices · 035641b0
    Peter Korsgaard authored
    Just calling wait_for_device_probe() is not enough to ensure that
    asynchronously probed block devices are available (E.G. mmc, usb), so
    add a "dm-mod.waitfor=<device1>[,..,<deviceN>]" parameter to get
    dm-init to explicitly wait for specific block devices before
    initializing the tables with logic similar to the rootwait logic that
    was introduced with commit  cc1ed754 ("init: wait for
    asynchronously scanned block devices").
    
    E.G. with dm-verity on mmc using:
    dm-mod.waitfor="PARTLABEL=hash-a,PARTLABEL=root-a"
    
    [    0.671671] device-mapper: init: waiting for all devices to be available before creating mapped devices
    [    0.671679] device-mapper: init: waiting for device PARTLABEL=hash-a ...
    [    0.710695] mmc0: new HS200 MMC card at address 0001
    [    0.711158] mmcblk0: mmc0:0001 004GA0 3.69 GiB
    [    0.715954] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB
    [    0.722085] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB
    [   ...
    035641b0
dm-init.c 7.98 KB