]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SCSI] rework scsi_target allocation
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 23 Mar 2008 03:42:27 +0000 (22:42 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 22 Apr 2008 20:16:31 +0000 (15:16 -0500)
commit643eb2d932c97a0583381629d632d486934cf7ee
tree514d860d8b6c22f50b8fdd7afd25047707321650
parentf7120a4f75168df3c02efacd10403a4ba0bcb29d
[SCSI] rework scsi_target allocation

The current target allocation code registeres each possible target
with sysfs; it will be deleted again if no useable LUN on this target
was found. This results in a string of 'target add/target remove' uevents.

Based on a patch by Hannes Reinecke <hare@suse.de> this patch reworks
the target allocation code so that only uevents for existing targets
are sent. The sysfs registration is split off from the existing
scsi_target_alloc() into a in a new scsi_add_target() function, which
should be called whenever an existing target is found. Only then a
uevent is sent, so we'll be generating events for existing targets
only.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_device.h