[−][src]Struct devicemapper::ThinDev
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]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
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]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
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]
&self,
dm: &DM,
snapshot_name: &DmName,
snapshot_uuid: Option<&DmUuid>,
thin_pool: &ThinPoolDev,
snapshot_thin_id: ThinDevId
) -> DmResult<ThinDev>
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]
&mut self,
dm: &DM,
table: TargetLine<ThinTargetParams>
) -> DmResult<()>
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,