mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@daterainc.com>
To: target-devel <target-devel@vger.kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
	Martin Petersen <martin.petersen@oracle.com>,
	Chris Mason <chris.mason@fusionio.com>,
	Roland Dreier <roland@purestorage.com>,
	Zach Brown <zab@redhat.com>, Kent Overstreet <kmo@daterainc.com>,
	Theodore Tso <tytso@mit.edu>,
	James Bottomley <JBottomley@Parallels.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Nicholas Bellinger <nab@daterainc.com>
Subject: [PATCH-v2 7/9] target: Enable EXTENDED_COPY setup in spc_parse_cdb
Date: Mon, 26 Aug 2013 22:03:06 +0000	[thread overview]
Message-ID: <1377554588-28394-8-git-send-email-nab@daterainc.com> (raw)
In-Reply-To: <1377554588-28394-1-git-send-email-nab@daterainc.com>

From: Nicholas Bellinger <nab@daterainc.com>

Setup up the se_cmd->execute_cmd() pointers for EXTENDED_COPY and
RECEIVE_COPY_RESULTS handling within spc_parse_cdb()

Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Martin Petersen <martin.petersen@oracle.com>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Zach Brown <zab@redhat.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
---
 drivers/target/target_core_spc.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index bd16a93..894e83b 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -35,7 +35,7 @@
 #include "target_core_alua.h"
 #include "target_core_pr.h"
 #include "target_core_ua.h"
-
+#include "target_core_xcopy.h"
 
 static void spc_fill_alua_data(struct se_port *port, unsigned char *buf)
 {
@@ -1252,8 +1252,14 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
 		*size = (cdb[6] << 24) | (cdb[7] << 16) | (cdb[8] << 8) | cdb[9];
 		break;
 	case EXTENDED_COPY:
-	case READ_ATTRIBUTE:
+		*size = get_unaligned_be32(&cdb[10]);
+		cmd->execute_cmd = target_do_xcopy;
+		break;
 	case RECEIVE_COPY_RESULTS:
+		*size = get_unaligned_be32(&cdb[10]);
+		cmd->execute_cmd = target_do_receive_copy_results;
+		break;
+	case READ_ATTRIBUTE:
 	case WRITE_ATTRIBUTE:
 		*size = (cdb[10] << 24) | (cdb[11] << 16) |
 		       (cdb[12] << 8) | cdb[13];
-- 
1.7.2.5


  parent reply	other threads:[~2013-08-26 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 22:02 [PATCH-v2 0/9] target: Add support for EXTENDED_COPY (VAAI) offload emulation Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 1/9] target: Make target_core_subsystem defined as non static Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 2/9] target: Make spc_parse_naa_6h_vendor_specific " Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 3/9] target: Make helpers non static for EXTENDED_COPY command setup Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 4/9] target: Add global device list for EXTENDED_COPY Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 5/9] target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 6/9] target: Add support for EXTENDED_COPY copy offload emulation Nicholas A. Bellinger
2013-08-26 22:03 ` Nicholas A. Bellinger [this message]
2013-08-26 22:03 ` [PATCH-v2 8/9] target: Add Third Party Copy (3PC) bit in INQUIRY response Nicholas A. Bellinger
2013-08-26 22:03 ` [PATCH-v2 9/9] target: Enable global EXTENDED_COPY setup/release Nicholas A. Bellinger
2013-08-26 22:46 ` [PATCH-v2 0/9] target: Add support for EXTENDED_COPY (VAAI) offload emulation Zach Brown
2013-08-27  0:02   ` 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=1377554588-28394-8-git-send-email-nab@daterainc.com \
    --to=nab@daterainc.com \
    --cc=JBottomley@Parallels.com \
    --cc=chris.mason@fusionio.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nab@linux-iscsi.org \
    --cc=roland@purestorage.com \
    --cc=target-devel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=zab@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®