From: James Bottomley Date: Sun, 23 Mar 2008 03:42:27 +0000 (-0500) Subject: [SCSI] rework scsi_target allocation X-Git-Tag: v2.6.26-rc1~1027^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=643eb2d932c97a0583381629d632d486934cf7ee;p=pandora-kernel.git [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 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 --- Reading git-diff-tree failed