pub struct DiskParameters {Show 13 fields
pub disk_id: Option<[u8; 16]>,
pub identity: Option<DiskIdentity>,
pub serial_number: Vec<u8>,
pub medium_rotation_rate: Option<u16>,
pub physical_sector_size: Option<u32>,
pub fua: Option<bool>,
pub write_cache: Option<bool>,
pub scsi_disk_size_in_bytes: Option<u64>,
pub odx: Option<bool>,
pub unmap: Option<bool>,
pub max_transfer_length: Option<usize>,
pub optimal_unmap_sectors: Option<u32>,
pub get_lba_status: bool,
}
Expand description
Parameters controlling SCSI disk behavior.
These parameters are all optional. If not provided, a default will be chosen based on the backing disk’s capabilities.
Fields§
§disk_id: Option<[u8; 16]>
The disk ID, used in T10 identification.
identity: Option<DiskIdentity>
Vendor/model disk information.
serial_number: Vec<u8>
The disk’s serial number.
medium_rotation_rate: Option<u16>
The SCSI medium rotation rate.
physical_sector_size: Option<u32>
The physical sector size.
fua: Option<bool>
Whether FUA is supported.
write_cache: Option<bool>
Whether a write cache is present.
scsi_disk_size_in_bytes: Option<u64>
The disk size to present.
odx: Option<bool>
Whether ODX (copy offload) is supported.
TODO: remove this, our emulator doesn’t support ODX.
unmap: Option<bool>
Whether unmap is supported.
max_transfer_length: Option<usize>
The maximum transfer length for IOs (TODO: or is it for write same?)
optimal_unmap_sectors: Option<u32>
The minimum optimal number of sectors to unmap in a request.
get_lba_status: bool
Report LBA status to the guest.
Note that this will always report fully mapped LBAs, since the underlying disk implementation has no mechanism to report unmapped LBAs.
Trait Implementations§
Source§impl Clone for DiskParameters
impl Clone for DiskParameters
Source§fn clone(&self) -> DiskParameters
fn clone(&self) -> DiskParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DiskParameters
impl Debug for DiskParameters
Source§impl Default for DiskParameters
impl Default for DiskParameters
Source§fn default() -> DiskParameters
fn default() -> DiskParameters
Source§impl DefaultEncoding for DiskParameters
impl DefaultEncoding for DiskParameters
Source§type Encoding = TableEncoder
type Encoding = TableEncoder
Source§impl<'encoding, AnyR: 'static> StructDecodeMetadata<'encoding, AnyR> for DiskParameters
impl<'encoding, AnyR: 'static> StructDecodeMetadata<'encoding, AnyR> for DiskParameters
Source§const DECODERS: &'static [ErasedDecoderEntry]
const DECODERS: &'static [ErasedDecoderEntry]
Source§impl<AnyR: 'static> StructEncodeMetadata<AnyR> for DiskParameters
impl<AnyR: 'static> StructEncodeMetadata<AnyR> for DiskParameters
Source§const ENCODERS: &'static [ErasedEncoderEntry]
const ENCODERS: &'static [ErasedEncoderEntry]
Auto Trait Implementations§
impl Freeze for DiskParameters
impl RefUnwindSafe for DiskParameters
impl Send for DiskParameters
impl Sync for DiskParameters
impl Unpin for DiskParameters
impl UnwindSafe for DiskParameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> MeshField for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshField for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
Source§impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
Source§impl<T> Protobuf for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: MessageEncode<T, NoResources> + for<'a> MessageDecode<'a, T, NoResources> + FieldEncode<T, NoResources> + for<'a> FieldDecode<'a, T, NoResources>,
impl<T> Protobuf for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: MessageEncode<T, NoResources> + for<'a> MessageDecode<'a, T, NoResources> + FieldEncode<T, NoResources> + for<'a> FieldDecode<'a, T, NoResources>,
Source§type Encoding = <T as DefaultEncoding>::Encoding
type Encoding = <T as DefaultEncoding>::Encoding
Self
.Source§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
Source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
MessageEncode::compute_message_size
.Source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
MessageEncode::write_message
.