Add PREVENTALLOWMEDIUMREMOVAL support

This commit is contained in:
Ronnie Sahlberg
2012-07-17 18:12:03 +10:00
parent 4a3935770d
commit 16da01ed4e
7 changed files with 89 additions and 0 deletions

View File

@@ -419,6 +419,26 @@ iscsi_startstopunit_sync(struct iscsi_context *iscsi, int lun,
return state.task;
}
struct scsi_task *
iscsi_preventallow_sync(struct iscsi_context *iscsi, int lun,
int prevent)
{
struct iscsi_sync_state state;
memset(&state, 0, sizeof(state));
if (iscsi_preventallow_task(iscsi, lun, prevent,
scsi_sync_cb, &state) == NULL) {
iscsi_set_error(iscsi,
"Failed to send PreventAllowMediumRemoval 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)