Commit 04b1b7954649767f2ab9bf08cf2457e21d5c7167

Authored by Nicholas Bellinger
Committed by Nicholas Bellinger
1 parent cbf031f425

target: Enable EXTENDED_COPY setup in spc_parse_cdb

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>

Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff

drivers/target/target_core_spc.c
... ... @@ -35,8 +35,8 @@
35 35 #include "target_core_alua.h"
36 36 #include "target_core_pr.h"
37 37 #include "target_core_ua.h"
  38 +#include "target_core_xcopy.h"
38 39  
39   -
40 40 static void spc_fill_alua_data(struct se_port *port, unsigned char *buf)
41 41 {
42 42 struct t10_alua_tg_pt_gp *tg_pt_gp;
43 43  
... ... @@ -1252,8 +1252,14 @@
1252 1252 *size = (cdb[6] << 24) | (cdb[7] << 16) | (cdb[8] << 8) | cdb[9];
1253 1253 break;
1254 1254 case EXTENDED_COPY:
1255   - case READ_ATTRIBUTE:
  1255 + *size = get_unaligned_be32(&cdb[10]);
  1256 + cmd->execute_cmd = target_do_xcopy;
  1257 + break;
1256 1258 case RECEIVE_COPY_RESULTS:
  1259 + *size = get_unaligned_be32(&cdb[10]);
  1260 + cmd->execute_cmd = target_do_receive_copy_results;
  1261 + break;
  1262 + case READ_ATTRIBUTE:
1257 1263 case WRITE_ATTRIBUTE:
1258 1264 *size = (cdb[10] << 24) | (cdb[11] << 16) |
1259 1265 (cdb[12] << 8) | cdb[13];