Add VERIFY16 support and tests
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
20
lib/sync.c
20
lib/sync.c
@@ -523,6 +523,26 @@ iscsi_verify10_sync(struct iscsi_context *iscsi, int lun, unsigned char *data, u
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_verify16_sync(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint64_t lba,
|
||||
int vprotect, int dpo, int bytchk, int blocksize)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_verify16_task(iscsi, lun, data, datalen, lba, vprotect, dpo, bytchk, blocksize,
|
||||
scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi,
|
||||
"Failed to send Verify16 command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_writesame10_sync(struct iscsi_context *iscsi, int lun,
|
||||
unsigned char *data, uint32_t datalen,
|
||||
|
||||
Reference in New Issue
Block a user