Libiscsi: add support for RECEIVE COPY RESULTS
Build on existing scsi_cdb_receive_copy_results() functionality. This request is most commonly used to determine target-side EXTENDED COPY operational parameters. Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
20
lib/sync.c
20
lib/sync.c
@@ -1667,6 +1667,26 @@ iscsi_report_supported_opcodes_sync(struct iscsi_context *iscsi, int lun,
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_receive_copy_results_sync(struct iscsi_context *iscsi, int lun,
|
||||
int sa, int list_id, int alloc_len)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_receive_copy_results_task(iscsi, lun, sa, list_id, alloc_len,
|
||||
scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi, "Failed to send RECEIVE COPY RESULTS"
|
||||
" command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_scsi_command_sync(struct iscsi_context *iscsi, int lun,
|
||||
struct scsi_task *task, struct iscsi_data *data)
|
||||
|
||||
Reference in New Issue
Block a user