]>
Commit | Line | Data |
---|---|---|
9889d8f6 GKH |
1 | From 30f359a6f9da65a66de8cadf959f0f4a0d498bba Mon Sep 17 00:00:00 2001 |
2 | From: Nicholas Bellinger <nab@linux-iscsi.org> | |
3 | Date: Wed, 10 Apr 2013 15:00:27 -0700 | |
4 | Subject: target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs | |
5 | ||
6 | From: Nicholas Bellinger <nab@linux-iscsi.org> | |
7 | ||
8 | commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream. | |
9 | ||
10 | This patch fixes a bug where a handful of informational / control CDBs | |
11 | that should be allowed during ALUA access state Standby/Offline/Transition | |
12 | where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*. | |
13 | ||
14 | This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN | |
15 | registration when LUN scanning occured during these ALUA access states. | |
16 | ||
17 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | |
18 | Cc: Hannes Reinecke <hare@suse.de> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/target/target_core_alua.c | 3 +++ | |
23 | 1 file changed, 3 insertions(+) | |
24 | ||
25 | --- a/drivers/target/target_core_alua.c | |
26 | +++ b/drivers/target/target_core_alua.c | |
27 | @@ -408,6 +408,7 @@ static inline int core_alua_state_standb | |
28 | case REPORT_LUNS: | |
29 | case RECEIVE_DIAGNOSTIC: | |
30 | case SEND_DIAGNOSTIC: | |
31 | + return 0; | |
32 | case MAINTENANCE_IN: | |
33 | switch (cdb[1] & 0x1f) { | |
34 | case MI_REPORT_TARGET_PGS: | |
35 | @@ -450,6 +451,7 @@ static inline int core_alua_state_unavai | |
36 | switch (cdb[0]) { | |
37 | case INQUIRY: | |
38 | case REPORT_LUNS: | |
39 | + return 0; | |
40 | case MAINTENANCE_IN: | |
41 | switch (cdb[1] & 0x1f) { | |
42 | case MI_REPORT_TARGET_PGS: | |
43 | @@ -490,6 +492,7 @@ static inline int core_alua_state_transi | |
44 | switch (cdb[0]) { | |
45 | case INQUIRY: | |
46 | case REPORT_LUNS: | |
47 | + return 0; | |
48 | case MAINTENANCE_IN: | |
49 | switch (cdb[1] & 0x1f) { | |
50 | case MI_REPORT_TARGET_PGS: |