pub struct ZnsZoneManager { /* private fields */ }Expand description
ZNS Zone Manager for hardware-sympathetic storage
Implementations§
Source§impl ZnsZoneManager
impl ZnsZoneManager
Sourcepub fn new<P: AsRef<Path>>(device_path: P) -> Result<Self, ZnsError>
pub fn new<P: AsRef<Path>>(device_path: P) -> Result<Self, ZnsError>
Create new ZNS zone manager
Sourcepub fn allocate_zone(
&mut self,
zone_type: ZoneType,
size: u64,
) -> Result<ZoneHandle, ZnsError>
pub fn allocate_zone( &mut self, zone_type: ZoneType, size: u64, ) -> Result<ZoneHandle, ZnsError>
Allocate zone for specific workload
Sourcepub fn write_zone(
&mut self,
handle: &ZoneHandle,
data: &[u8],
) -> Result<(), ZnsError>
pub fn write_zone( &mut self, handle: &ZoneHandle, data: &[u8], ) -> Result<(), ZnsError>
Write data to zone (zero-copy when possible)
Sourcepub fn read_zone(
&mut self,
handle: &ZoneHandle,
offset: u64,
length: u64,
) -> Result<Vec<u8>, ZnsError>
pub fn read_zone( &mut self, handle: &ZoneHandle, offset: u64, length: u64, ) -> Result<Vec<u8>, ZnsError>
Read data from zone
Sourcepub fn zero_copy_access(
&self,
handle: &ZoneHandle,
) -> Result<ZeroCopyBuffer, ZnsError>
pub fn zero_copy_access( &self, handle: &ZoneHandle, ) -> Result<ZeroCopyBuffer, ZnsError>
Get zero-copy access to zone data
Sourcepub fn flush_zone(&mut self, handle: &ZoneHandle) -> Result<(), ZnsError>
pub fn flush_zone(&mut self, handle: &ZoneHandle) -> Result<(), ZnsError>
Flush zone to ensure data persistence
Sourcepub fn reset_zone(&mut self, handle: &ZoneHandle) -> Result<(), ZnsError>
pub fn reset_zone(&mut self, handle: &ZoneHandle) -> Result<(), ZnsError>
Reset zone for reuse
Sourcepub fn get_device_stats(&self) -> DeviceStats
pub fn get_device_stats(&self) -> DeviceStats
Get device statistics
Auto Trait Implementations§
impl Freeze for ZnsZoneManager
impl RefUnwindSafe for ZnsZoneManager
impl Send for ZnsZoneManager
impl Sync for ZnsZoneManager
impl Unpin for ZnsZoneManager
impl UnsafeUnpin for ZnsZoneManager
impl UnwindSafe for ZnsZoneManager
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more