From: Lee Duncan <lduncan@suse.com>
To: target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Subject: [PATCH] Allow EA reservation holders to read from device.
Date: Mon, 05 Jan 2015 10:49:44 -0800 [thread overview]
Message-ID: <54AADCC8.2010403@suse.com> (raw)
From: Lee Duncan <lduncan@suse.com>
For PGR reservation type Exclusive Access, allow all
registrants to read from the device.
Signed-off-by: Lee Duncan <lduncan@suse.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
---
drivers/target/target_core_pr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 85564998500a..cb762b174c08 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -551,6 +551,18 @@ static int core_scsi3_pr_seq_non_holder(
return 0;
}
+ } else if (we && registered_nexus) {
+ /*
+ * Reads are allowed for Write Exclusive locks
+ * from all registrants.
+ */
+ if (cmd->data_direction == DMA_FROM_DEVICE) {
+ pr_debug("Allowing READ CDB: 0x%02x for %s"
+ " reservation\n", cdb[0],
+ core_scsi3_pr_dump_type(pr_reg_type));
+
+ return 0;
+ }
}
pr_debug("%s Conflict for %sregistered nexus %s CDB: 0x%2x"
" for %s reservation\n", transport_dump_cmd_direction(cmd),
--
1.8.5.2
next reply other threads:[~2015-01-05 18:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 18:49 Lee Duncan [this message]
2015-01-06 21:23 ` [PATCH] Allow EA reservation holders to read from device Nicholas A. Bellinger
2015-01-07 3:08 ` Lee Duncan
2015-01-07 16:31 ` Nicholas A. Bellinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54AADCC8.2010403@suse.com \
--to=lduncan@suse.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.