Commit 670ffb50413f386f92e59511c60b679f46e5cace
Committed by
Greg Kroah-Hartman
1 parent
e75fa31d0f
Exists in
ti-linux-3.14.y
and in
2 other branches
target: Allow READ_CAPACITY opcode in ALUA Standby access state
commit e7810c2d2c37fa8e58dda74b00790dab60fe6fba upstream. This patch allows READ_CAPACITY + SAI_READ_CAPACITY_16 opcode processing to occur while the associated ALUA group is in Standby access state. This is required to avoid host side LUN probe failures during the initial scan if an ALUA group has already implicitly changed into Standby access state. This addresses a bug reported by Chris + Philip using dm-multipath + ESX hosts configured with ALUA multipath. (Drop v3.15 specific set_ascq usage - nab) Reported-by: Chris Boot <crb@tiger-computing.co.uk> Reported-by: Philip Gaw <pgaw@darktech.org.uk> Cc: Chris Boot <crb@tiger-computing.co.uk> Cc: Philip Gaw <pgaw@darktech.org.uk> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff
drivers/target/target_core_alua.c
... | ... | @@ -564,7 +564,16 @@ |
564 | 564 | case REPORT_LUNS: |
565 | 565 | case RECEIVE_DIAGNOSTIC: |
566 | 566 | case SEND_DIAGNOSTIC: |
567 | + case READ_CAPACITY: | |
567 | 568 | return 0; |
569 | + case SERVICE_ACTION_IN: | |
570 | + switch (cdb[1] & 0x1f) { | |
571 | + case SAI_READ_CAPACITY_16: | |
572 | + return 0; | |
573 | + default: | |
574 | + *alua_ascq = ASCQ_04H_ALUA_TG_PT_STANDBY; | |
575 | + return 1; | |
576 | + } | |
568 | 577 | case MAINTENANCE_IN: |
569 | 578 | switch (cdb[1] & 0x1f) { |
570 | 579 | case MI_REPORT_TARGET_PGS: |