Add SYNCHRONIZECACHE16 support

This commit is contained in:
Ronnie Sahlberg
2012-07-13 10:19:44 +10:00
parent eaff5a4e4e
commit 1745f76bef
7 changed files with 92 additions and 0 deletions

View File

@@ -1016,6 +1016,29 @@ iscsi_synchronizecache10_task(struct iscsi_context *iscsi, int lun, int lba,
return task;
}
struct scsi_task *
iscsi_synchronizecache16_task(struct iscsi_context *iscsi, int lun, uint64_t lba,
uint32_t num_blocks, int syncnv, int immed,
iscsi_command_cb cb, void *private_data)
{
struct scsi_task *task;
task = scsi_cdb_synchronizecache16(lba, num_blocks, syncnv,
immed);
if (task == NULL) {
iscsi_set_error(iscsi, "Out-of-memory: Failed to create "
"synchronizecache16 cdb.");
return NULL;
}
if (iscsi_scsi_command_async(iscsi, lun, task, cb, NULL,
private_data) != 0) {
scsi_free_scsi_task(task);
return NULL;
}
return task;
}
struct scsi_task *
iscsi_prefetch10_task(struct iscsi_context *iscsi, int lun, uint32_t lba,
int num_blocks, int immed, int group,