]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is transitioning
authorStewart, Sean <Sean.Stewart@netapp.com>
Tue, 15 Oct 2013 15:52:54 +0000 (15:52 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 10:19:33 +0000 (11:19 +0100)
commit2c8c05cb8e7534eb7f106063c1179da8d28e2b08
tree879d7cc9168fbe2c9fceba2c16923f59c2f69ed1
parent5c825862b723456ae49b5bbc37b4d1e465e53f8a
[SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is transitioning

During testing, it was discovered that when a device tries to attach to the
alua handler while in TPG state of transitioning, the alua_rtpg function will
wait for it to exit the state before allowing it to continue. As a result, if
the 60 second timeout expires, the alua handler will not attach to the device.

To fix this, I have introduced an input argument to alua_rtpg called
wait_for_transition.  The idea is that it will wait for the transition to
complete before an activation (because the current TPG state has some bearing
in that case), but during a discovery if it is transitioning, it will not
wait, and will store the state as standby for the time being.

I believe the precedent exists for this from commit
2e37132f4980e85d4ea3ca25e631f06a4c7b00e2 Since if the device reports a state
of transitioning, it can transition to other more valid states, and it has
been established TPGS is supported on the device, if it is attaching.

Signed-off-by: Sean Stewart <Sean.Stewart@netapp.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/device_handler/scsi_dh_alua.c