22 Apr, 2009

1 commit

  • There is currently only one way for userspace to say "wait for my storage
    device to get ready for the modules I just loaded": to load the
    scsi_wait_scan module. Expectations of userspace are that once this
    module is loaded, all the (storage) devices for which the drivers
    were loaded before the module load are present.

    Now, there are some issues with the implementation, and the async
    stuff got caught in the middle of this: The existing code only
    waits for the scsy async probing to finish, but it did not take
    into account at all that probing might not have begun yet.
    (Russell ran into this problem on his computer and the fix works for him)

    This patch fixes this more thoroughly than the previous "fix", which
    had some bad side effects (namely, for kernel code that wanted to wait for
    the scsi scan it would also do an async sync, which would deadlock if you did
    it from async context already.. there's a report about that on lkml):
    The patch makes the module first wait for all device driver probes, and then it
    will wait for the scsi parallel scan to finish.

    Signed-off-by: Arjan van de Ven
    Tested-by: Russell King
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

14 Apr, 2009

1 commit

  • There is a race between resume from hibernation and the asynchronous
    scanning of SCSI devices and to prevent it from happening we need to
    call scsi_complete_async_scans() during resume from hibernation.

    In addition, if the resume from hibernation is userland-driven, it's
    better to wait for all device probes in the kernel to complete before
    attempting to open the resume device.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

12 Oct, 2006

1 commit

  • Since it often takes around 20-30 seconds to scan a scsi bus, it's
    highly advantageous to do this in parallel with other things. The bulk
    of this patch is ensuring that devices don't change numbering, and that
    all devices are discovered prior to trying to start init. For those
    who build SCSI as modules, there's a new scsi_wait_scan module that will
    ensure all bus scans are finished.

    This patch only handles drivers which call scsi_scan_host. Fibre Channel,
    SAS, SATA, USB and Firewire all need additional work.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox