aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2015-01-05 13:49:44 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2015-01-09 18:22:14 -0500
commit1ecc7586922662e3ca2f3f0c3f17fec8749fc621 (patch)
tree664763703acb720ca3a7daa86fe16b389c9793cd /drivers/target
parent7216dc077dfcd46e2e0143f57711c8dd2eb99e68 (diff)
target: Allow Write Exclusive non-reservation holders to READ
For PGR reservation of type Write Exclusive Access, allow all non reservation holding I_T nexuses with active registrations to READ from the device. This addresses a bug where active registrations that attempted to READ would result in an reservation conflict. Signed-off-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_pr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index d56f2aaba9af..283cf786ef98 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -528,6 +528,18 @@ static int core_scsi3_pr_seq_non_holder(
528 528
529 return 0; 529 return 0;
530 } 530 }
531 } else if (we && registered_nexus) {
532 /*
533 * Reads are allowed for Write Exclusive locks
534 * from all registrants.
535 */
536 if (cmd->data_direction == DMA_FROM_DEVICE) {
537 pr_debug("Allowing READ CDB: 0x%02x for %s"
538 " reservation\n", cdb[0],
539 core_scsi3_pr_dump_type(pr_reg_type));
540
541 return 0;
542 }
531 } 543 }
532 pr_debug("%s Conflict for %sregistered nexus %s CDB: 0x%2x" 544 pr_debug("%s Conflict for %sregistered nexus %s CDB: 0x%2x"
533 " for %s reservation\n", transport_dump_cmd_direction(cmd), 545 " for %s reservation\n", transport_dump_cmd_direction(cmd),