Add support for STARTSTOPUNIT command
This commit is contained in:
22
lib/sync.c
22
lib/sync.c
@@ -397,6 +397,28 @@ iscsi_synchronizecache10_sync(struct iscsi_context *iscsi, int lun, int lba,
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_startstopunit_sync(struct iscsi_context *iscsi, int lun,
|
||||
int immed, int pcm, int pc,
|
||||
int no_flush, int loej, int start)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_startstopunit_task(iscsi, lun, immed, pcm, pc,
|
||||
no_flush, loej, start,
|
||||
scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi,
|
||||
"Failed to send StartStopUnit command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_synchronizecache16_sync(struct iscsi_context *iscsi, int lun, uint64_t lba,
|
||||
uint32_t num_blocks, int syncnv, int immed)
|
||||
|
||||
Reference in New Issue
Block a user