Libiscsi: add support for EXTENDED COPY

Build on existing scsi_cdb_extended_copy() functionality. This operation
can be used to offload inter and intra LU copies to the target.

The API is rather primitive, in that the caller needs to construct the
parameter buffer, including CSCD and segment descriptor lists, etc.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2017-01-03 23:58:20 +01:00
parent f475436c5a
commit 4bc5f962e2
5 changed files with 56 additions and 0 deletions

View File

@@ -1134,6 +1134,11 @@ iscsi_receive_copy_results_task(struct iscsi_context *iscsi, int lun,
int sa, int list_id, int alloc_len,
iscsi_command_cb cb, void *private_data);
EXTERN struct scsi_task *
iscsi_extended_copy_task(struct iscsi_context *iscsi, int lun,
struct iscsi_data *param_data,
iscsi_command_cb cb, void *private_data);
/*
* Sync commands for SCSI
*/
@@ -1459,6 +1464,10 @@ iscsi_report_supported_opcodes_sync(struct iscsi_context *iscsi, int lun,
int opcode, int sa,
uint32_t alloc_len);
EXTERN struct scsi_task *
iscsi_extended_copy_sync(struct iscsi_context *iscsi, int lun,
struct iscsi_data *param_data);
EXTERN struct scsi_task *
iscsi_receive_copy_results_sync(struct iscsi_context *iscsi, int lun,
int sa, int list_id, int alloc_len);