scsi: disable automatic target scan
On larger installations it is useful to disable automatic LUN scanning, and only add the required LUNs via udev rules. This can speed up bootup dramatically. This patch introduces a new scan module parameter value 'manual', which works like 'none', but can be overridden by setting the 'rescan' value from scsi_scan_target to 'SCSI_SCAN_MANUAL'. And it updates all relevant callers to set the 'rescan' value to 'SCSI_SCAN_MANUAL' if invoked via the 'scan' option in sysfs. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Tested-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
216fad9138
commit
1d64508810
@@ -251,7 +251,8 @@ static int scsi_add_single_device(uint host, uint channel, uint id, uint lun)
|
||||
if (shost->transportt->user_scan)
|
||||
error = shost->transportt->user_scan(shost, channel, id, lun);
|
||||
else
|
||||
error = scsi_scan_host_selected(shost, channel, id, lun, 1);
|
||||
error = scsi_scan_host_selected(shost, channel, id, lun,
|
||||
SCSI_SCAN_MANUAL);
|
||||
scsi_host_put(shost);
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user