]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fc class: fix scanning when devs are offline
authorMike Christie <michaelc@cs.wisc.edu>
Mon, 16 Apr 2012 02:47:50 +0000 (21:47 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 10 May 2012 07:59:23 +0000 (08:59 +0100)
commitfc053cbebe646130b6e561b651b4a96558e0d5db
treeb10e8bc41a7d643a47dce1ac99567f4919e0a9fd
parent8643a0709af10061924c7ec1fc53859fd0094f0b
[SCSI] fc class: fix scanning when devs are offline

When a rport is added back or the role is changed the fc class
will queue a scan and then call scsi_target_unblock. The problem
with this is if the devices are in the SDEV_OFFLINE state and
the scan is run before the scsi_target_unblock, then the scan
will see LUN0 as offline and the scan will fail. This patch moves
the unblock call to before the scan, so we know the device state
will be set correctly when the scan is run.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_transport_fc.c