/// <summary> /// Write blocks to the storage unit. /// </summary> public virtual void Write( Byte[] Buffer, UInt64 BlockAddress, UInt32 BlockCount, Boolean Flush, ref StorageUnitStatus Status) { }
private static Boolean Unmap( IntPtr StorageUnitPtr, IntPtr Descriptors, UInt32 Count, ref StorageUnitStatus Status) { StorageUnitBase StorageUnit = (StorageUnitBase)Api.GetUserContext(StorageUnitPtr); UnmapDescriptor[] DescriptorArray = Api.MakeUnmapDescriptorArray(Descriptors, Count); try { StorageUnit.Unmap(DescriptorArray, ref Status); } catch (Exception) { } return(true); }
private static Boolean Flush( IntPtr StorageUnitPtr, UInt64 BlockAddress, UInt32 BlockCount, ref StorageUnitStatus Status) { StorageUnitBase StorageUnit = (StorageUnitBase)Api.GetUserContext(StorageUnitPtr); try { StorageUnit.Flush(BlockAddress, BlockCount, ref Status); } catch (Exception) { Status.SetSense( StorageUnitBase.SCSI_SENSE_MEDIUM_ERROR, StorageUnitBase.SCSI_ADSENSE_WRITE_ERROR); } return(true); }
/* SPD_STORAGE_UNIT_INTERFACE */ private static Boolean Read( IntPtr StorageUnitPtr, IntPtr Buffer, UInt64 BlockAddress, UInt32 BlockCount, Boolean Flush, ref StorageUnitStatus Status) { StorageUnitBase StorageUnit = (StorageUnitBase)Api.GetUserContext(StorageUnitPtr); try { StorageUnit.Read(_ThreadBuffer, BlockAddress, BlockCount, Flush, ref Status); } catch (Exception) { Status.SetSense( StorageUnitBase.SCSI_SENSE_MEDIUM_ERROR, StorageUnitBase.SCSI_ADSENSE_UNRECOVERED_ERROR); } return(true); }
/// <summary> /// Flush cached blocks to the storage unit. /// </summary> public virtual void Flush( UInt64 BlockAddress, UInt32 BlockCount, ref StorageUnitStatus Status) { }
/// <summary> /// Unmap blocks from the storage unit. /// </summary> public virtual void Unmap( UnmapDescriptor[] Descriptors, ref StorageUnitStatus Status) { }