pub struct StripedDisk { /* private fields */ }
Implementations§
Source§impl StripedDisk
impl StripedDisk
Sourcepub fn new(
devices: Vec<Disk>,
chunk_size_in_bytes: Option<u32>,
logic_sector_count: Option<u64>,
) -> Result<Self, NewDeviceError>
pub fn new( devices: Vec<Disk>, chunk_size_in_bytes: Option<u32>, logic_sector_count: Option<u64>, ) -> Result<Self, NewDeviceError>
Constructs a new StripedDisk
backed by the vector of file.
§Arguments
devices
- The backing devices opened for raw access.- ‘chunk_size_in_bytes’ - The chunk size of the striped disk, and the default value is 128K.
- ‘logic_sector_count’ - The sector count of the striped disk, and the default value is the sum of the sector count of the backing devices.
Trait Implementations§
Source§impl Debug for StripedDisk
impl Debug for StripedDisk
Source§impl DiskIo for StripedDisk
impl DiskIo for StripedDisk
Source§fn sector_count(&self) -> u64
fn sector_count(&self) -> u64
Returns the current sector count. Read more
Source§fn sector_size(&self) -> u32
fn sector_size(&self) -> u32
Returns the logical sector size of the backing store. Read more
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Returns true if the disk is read only.
Source§fn disk_id(&self) -> Option<[u8; 16]>
fn disk_id(&self) -> Option<[u8; 16]>
Optionally returns a 16-byte identifier for the disk, if there is a
natural one for this backing store. Read more
Source§fn physical_sector_size(&self) -> u32
fn physical_sector_size(&self) -> u32
Returns the physical sector size of the backing store. Read more
Source§fn is_fua_respected(&self) -> bool
fn is_fua_respected(&self) -> bool
Returns true if the
fua
parameter to [DiskIo::write_vectored
] is
respected by the backing store by ensuring that the IO is immediately
committed to disk.Source§async fn eject(&self) -> Result<(), DiskError>
async fn eject(&self) -> Result<(), DiskError>
Issues an asynchronous eject media operation to the disk.
Source§async fn read_vectored(
&self,
buffers: &RequestBuffers<'_>,
start_sector: u64,
) -> Result<(), DiskError>
async fn read_vectored( &self, buffers: &RequestBuffers<'_>, start_sector: u64, ) -> Result<(), DiskError>
Issues an asynchronous read-scatter operation to the disk. Read more
Source§async fn write_vectored(
&self,
buffers: &RequestBuffers<'_>,
start_sector: u64,
fua: bool,
) -> Result<(), DiskError>
async fn write_vectored( &self, buffers: &RequestBuffers<'_>, start_sector: u64, fua: bool, ) -> Result<(), DiskError>
Issues an asynchronous write-gather operation to the disk. Read more
Source§async fn sync_cache(&self) -> Result<(), DiskError>
async fn sync_cache(&self) -> Result<(), DiskError>
Issues an asynchronous flush operation to the disk.
Source§async fn unmap(
&self,
start_sector: u64,
sector_count: u64,
block_level_only: bool,
) -> Result<(), DiskError>
async fn unmap( &self, start_sector: u64, sector_count: u64, block_level_only: bool, ) -> Result<(), DiskError>
Unmap sectors from the layer.
Source§fn unmap_behavior(&self) -> UnmapBehavior
fn unmap_behavior(&self) -> UnmapBehavior
Returns the behavior of the unmap operation.
Source§fn optimal_unmap_sectors(&self) -> u32
fn optimal_unmap_sectors(&self) -> u32
Returns the optimal granularity for unmaps, in sectors.
Auto Trait Implementations§
impl Freeze for StripedDisk
impl !RefUnwindSafe for StripedDisk
impl Send for StripedDisk
impl Sync for StripedDisk
impl Unpin for StripedDisk
impl !UnwindSafe for StripedDisk
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
Mutably borrows from an owned value. Read more