Skip to content
  • Linus Torvalds's avatar
    Make wait_for_device_probe() also do scsi_complete_async_scans() · eea03c20
    Linus Torvalds authored
    Commit a7a20d10 ("sd: limit the scope of the async probe domain")
    make the SCSI device probing run device discovery in it's own async
    domain.
    
    However, as a result, the partition detection was no longer synchronized
    by async_synchronize_full() (which, despite the name, only synchronizes
    the global async space, not all of them).  Which in turn meant that
    "wait_for_device_probe()" would not wait for the SCSI partitions to be
    parsed.
    
    And "wait_for_device_probe()" was what the boot time init code relied on
    for mounting the root filesystem.
    
    Now, most people never noticed this, because not only is it
    timing-dependent, but modern distributions all use initrd.  So the root
    filesystem isn't actually on a disk at all.  And then before they
    actually mount the final disk filesystem, they will have loaded the
    scsi-wait-scan module, which not only does the expected
    wait_for_device_probe(), but also does scsi_complete_async_scans().
    
    [ Side note: scs...
    eea03c20