Add support for PERSISTENT_RESERVE_IN and add a simple test for READ_KEYS

This commit is contained in:
Ronnie Sahlberg
2012-12-17 19:01:50 -08:00
parent f1d3aa073f
commit c60093eafe
11 changed files with 213 additions and 1 deletions

View File

@@ -798,6 +798,26 @@ iscsi_writesame16_sync(struct iscsi_context *iscsi, int lun,
return state.task;
}
struct scsi_task *
iscsi_persistent_reserve_in_sync(struct iscsi_context *iscsi, int lun,
int sa, uint16_t xferlen)
{
struct iscsi_sync_state state;
memset(&state, 0, sizeof(state));
if (iscsi_persistent_reserve_in_task(iscsi, lun, sa, xferlen,
scsi_sync_cb, &state) == NULL) {
iscsi_set_error(iscsi,
"Failed to send PERSISTENT_RESERVE_IN command");
return NULL;
}
event_loop(iscsi, &state);
return state.task;
}
struct scsi_task *
iscsi_unmap_sync(struct iscsi_context *iscsi, int lun, int anchor, int group,
struct unmap_list *list, int list_len)