Add SYNCHRONIZECACHE16 support
This commit is contained in:
21
lib/sync.c
21
lib/sync.c
@@ -397,6 +397,27 @@ iscsi_synchronizecache10_sync(struct iscsi_context *iscsi, int lun, int lba,
|
||||
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)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_synchronizecache16_task(iscsi, lun, lba, num_blocks,
|
||||
syncnv, immed,
|
||||
scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi,
|
||||
"Failed to send SynchronizeCache16 command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_prefetch10_sync(struct iscsi_context *iscsi, int lun, uint32_t lba,
|
||||
int num_blocks, int immed, int group)
|
||||
|
||||
Reference in New Issue
Block a user