-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SCSI] Add ability to scan scsi busses asynchronously
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 <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
- Loading branch information
Matthew Wilcox
authored and
James Bottomley
committed
Oct 11, 2006
1 parent
53a5fbd
commit 3e082a9
Showing
7 changed files
with
256 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* scsi_wait_scan.c | ||
* | ||
* Copyright (C) 2006 James Bottomley <James.Bottomley@SteelEye.com> | ||
* | ||
* This is a simple module to wait until all the async scans are | ||
* complete. The idea is to use it in initrd/initramfs scripts. You | ||
* modprobe it after all the modprobes of the root SCSI drivers and it | ||
* will wait until they have all finished scanning their busses before | ||
* allowing the boot to proceed | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include "scsi_priv.h" | ||
|
||
static int __init wait_scan_init(void) | ||
{ | ||
scsi_complete_async_scans(); | ||
return 0; | ||
} | ||
|
||
static void __exit wait_scan_exit(void) | ||
{ | ||
} | ||
|
||
MODULE_DESCRIPTION("SCSI wait for scans"); | ||
MODULE_AUTHOR("James Bottomley"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
late_initcall(wait_scan_init); | ||
module_exit(wait_scan_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters