[][src]Struct devicemapper::CacheDev

pub struct CacheDev { /* fields omitted */ }

DM Cache device

Methods

impl CacheDev[src]

Cache device implementation.

pub fn new(
    dm: &DM,
    name: &DmName,
    uuid: Option<&DmUuid>,
    meta: LinearDev,
    cache: LinearDev,
    origin: LinearDev,
    cache_block_size: Sectors
) -> DmResult<CacheDev>
[src]

Construct a new CacheDev with the given data and meta devs. Returns an error if the device is already known to the kernel.

pub fn setup(
    dm: &DM,
    name: &DmName,
    uuid: Option<&DmUuid>,
    meta: LinearDev,
    cache: LinearDev,
    origin: LinearDev,
    cache_block_size: Sectors
) -> DmResult<CacheDev>
[src]

Set up a cache device from the given metadata and data devices.

pub fn set_origin_table(
    &mut self,
    dm: &DM,
    table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>
[src]

Set the table for the existing origin device. This action puts the device in a state where it is ready to be resumed. Warning: It is the client's responsibility to make sure the designated table is compatible with the device's existing table. If not, this function will still succeed, but some kind of data corruption will be the inevitable result.

pub fn set_cache_table(
    &mut self,
    dm: &DM,
    table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>
[src]

Set the table for the existing cache sub-device. This action puts the device in a state where it is ready to be resumed. Warning: It is the client's responsibility to make sure the designated table is compatible with the device's existing table. If not, this function will still succeed, but some kind of data corruption will be the inevitable result.

pub fn set_meta_table(
    &mut self,
    dm: &DM,
    table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>
[src]

Set the table for the existing meta sub-device. This action puts the device in a state where it is ready to be resumed. Warning: It is the client's responsibility to make sure the designated table is compatible with the device's existing table. If not, this function will still succeed, but some kind of data corruption will be the inevitable result.

pub fn status(&self, dm: &DM) -> DmResult<CacheDevStatus>[src]

Get the current status of the cache device.

Trait Implementations

impl Debug for CacheDev[src]

Auto Trait Implementations

impl Send for CacheDev

impl Sync for CacheDev

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]