Commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba
1 parent
055f648c49
Exists in
master
and in
20 other branches
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
This patch fixes a bug where a handful of informational / control CDBs that should be allowed during ALUA access state Standby/Offline/Transition where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*. This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN registration when LUN scanning occured during these ALUA access states. Cc: Hannes Reinecke <hare@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
drivers/target/target_core_alua.c
... | ... | @@ -409,6 +409,7 @@ |
409 | 409 | case REPORT_LUNS: |
410 | 410 | case RECEIVE_DIAGNOSTIC: |
411 | 411 | case SEND_DIAGNOSTIC: |
412 | + return 0; | |
412 | 413 | case MAINTENANCE_IN: |
413 | 414 | switch (cdb[1] & 0x1f) { |
414 | 415 | case MI_REPORT_TARGET_PGS: |
... | ... | @@ -451,6 +452,7 @@ |
451 | 452 | switch (cdb[0]) { |
452 | 453 | case INQUIRY: |
453 | 454 | case REPORT_LUNS: |
455 | + return 0; | |
454 | 456 | case MAINTENANCE_IN: |
455 | 457 | switch (cdb[1] & 0x1f) { |
456 | 458 | case MI_REPORT_TARGET_PGS: |
... | ... | @@ -491,6 +493,7 @@ |
491 | 493 | switch (cdb[0]) { |
492 | 494 | case INQUIRY: |
493 | 495 | case REPORT_LUNS: |
496 | + return 0; | |
494 | 497 | case MAINTENANCE_IN: |
495 | 498 | switch (cdb[1] & 0x1f) { |
496 | 499 | case MI_REPORT_TARGET_PGS: |