[SCSI] zfcp: Flush SCSI registration work when adding unit
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Tue, 13 Oct 2009 08:44:11 +0000 (10:44 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 22 Oct 2009 00:38:51 +0000 (09:38 +0900)
commit9e820afd0c4f3c8e8894aa91f5671fd7d11a787b
tree5cc2c79cdf223eb30b43c85caf7a281edbf24be3
parent9d38500de156fb28ffa8741acb90c4dc90a9fb4b
[SCSI] zfcp: Flush SCSI registration work when adding unit

When configuring a LUN for use in zfcp, flush the SCSI work to ensure
the SCSI device has been created before returning. This means that a
configuration procedure can run these commands in a script and the
SCSI device is available immediately after the unit_add:

echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.181d/online
echo 0x401040C300000000 > \
        /sys/bus/ccw/drivers/zfcp/0.0.181d/0x500507630313c562/unit_add
lsscsi

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_sysfs.c