Add RESERVE6/RELEASE6 Support.

This commit is contained in:
Jon Grimm
2012-09-27 12:45:06 -05:00
parent 1619d0e404
commit c7d8d2593c
7 changed files with 159 additions and 1 deletions

View File

@@ -840,6 +840,40 @@ iscsi_readtoc_sync(struct iscsi_context *iscsi, int lun, int msf, int format,
return state.task;
}
struct scsi_task *
iscsi_reserve6_sync(struct iscsi_context *iscsi, int lun)
{
struct iscsi_sync_state state;
memset(&state, 0, sizeof(state));
if (iscsi_reserve6_task(iscsi, lun, scsi_sync_cb, &state) == NULL) {
iscsi_set_error(iscsi, "Failed to send RESERVE6 command");
return NULL;
}
event_loop(iscsi, &state);
return state.task;
}
struct scsi_task *
iscsi_release6_sync(struct iscsi_context *iscsi, int lun)
{
struct iscsi_sync_state state;
memset(&state, 0, sizeof(state));
if (iscsi_release6_task(iscsi, lun, scsi_sync_cb, &state) == NULL) {
iscsi_set_error(iscsi, "Failed to send RELEASE6 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)