[][src]Struct devicemapper::ThinDev

pub struct ThinDev { /* fields omitted */ }

DM construct for a thin block device

Methods

impl ThinDev[src]

support use of DM for thin provisioned devices over pools

pub fn new(
    dm: &DM,
    name: &DmName,
    uuid: Option<&DmUuid>,
    length: Sectors,
    thin_pool: &ThinPoolDev,
    thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]

Create a ThinDev using thin_pool as the backing store. If the specified thin_id is already in use by the thin pool an error is returned. If the device is already among the list of devices that dm is aware of, return an error.

pub fn setup(
    dm: &DM,
    name: &DmName,
    uuid: Option<&DmUuid>,
    length: Sectors,
    thin_pool: &ThinPoolDev,
    thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]

Set up a thin device which already belongs to the given thin_pool. The thin device is identified by the thin_id, which is already known to the pool.

If the device is already known to kernel, just verify that specified data matches and return an error if it does not.

If the device has no thin id already registered with the thin pool an error is returned.

pub fn snapshot(
    &self,
    dm: &DM,
    snapshot_name: &DmName,
    snapshot_uuid: Option<&DmUuid>,
    thin_pool: &ThinPoolDev,
    snapshot_thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]

Create a snapshot of a ThinDev. Once created a snapshot is the same as any other thin provisioned device. There is no need to track any connection between the source and the snapshot.

pub fn id(&self) -> ThinDevId[src]

return the thin id of the linear device

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

Get the current status of the thin device.

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

Set the table for the thin device's target

pub fn destroy(&mut self, dm: &DM, thin_pool: &ThinPoolDev) -> DmResult<()>[src]

Tear down the DM device, and also delete resources associated with its thin id from the thinpool.

Trait Implementations

impl Debug for ThinDev[src]

Auto Trait Implementations

impl Send for ThinDev

impl Sync for ThinDev

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]