Struct devicemapper::ThinPoolDev [−][src]
pub struct ThinPoolDev { /* fields omitted */ }DM construct to contain thin provisioned devices
Implementations
impl ThinPoolDev[src]
Use DM to create a “thin-pool”. A “thin-pool” is shared space for other thin provisioned devices to use.
See section “Setting up a fresh pool device”: https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt
pub fn new(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
data: LinearDev,
data_block_size: Sectors,
low_water_mark: DataBlocks
) -> DmResult<ThinPoolDev>[src]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
data: LinearDev,
data_block_size: Sectors,
low_water_mark: DataBlocks
) -> DmResult<ThinPoolDev>
Construct a new ThinPoolDev with the given data and meta devs. Returns an error if the device is already known to the kernel. Returns an error if data_block_size is not within required range. Precondition: the metadata device does not contain any pool metadata.
pub fn meta_dev(&self) -> &LinearDev[src]
Obtain the meta device that backs this thin pool device.
pub fn data_dev(&self) -> &LinearDev[src]
Obtain the data device that backs this thin pool device.
pub fn data_block_size(&self) -> Sectors[src]
Obtain the data block size for this thin pool device.
pub fn setup(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
data: LinearDev,
data_block_size: Sectors,
low_water_mark: DataBlocks
) -> DmResult<ThinPoolDev>[src]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
data: LinearDev,
data_block_size: Sectors,
low_water_mark: DataBlocks
) -> DmResult<ThinPoolDev>
Set up a thin pool from the given metadata and data device. Returns an error if data_block_size is not within required range. Precondition: There is existing metadata for this thinpool device on the metadata device. If the metadata is corrupted, subsequent errors will result, so it is expected that the metadata is well-formed and consistent with the data on the data device.
pub fn set_low_water_mark(
&mut self,
dm: &DM,
low_water_mark: DataBlocks
) -> DmResult<()>[src]
&mut self,
dm: &DM,
low_water_mark: DataBlocks
) -> DmResult<()>
Set the low water mark. This action puts the device in a state where it is ready to be resumed.
pub fn status(&self, dm: &DM) -> DmResult<ThinPoolStatus>[src]
Get the current status of the thinpool. Returns an error if there was an error getting the status value.
pub fn set_meta_table(
&mut self,
dm: &DM,
table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>[src]
&mut self,
dm: &DM,
table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>
Set the table for the existing metadata 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 are not, this function will still succeed, but some kind of data corruption will be the inevitable result.
pub fn set_data_table(
&mut self,
dm: &DM,
table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>[src]
&mut self,
dm: &DM,
table: Vec<TargetLine<LinearDevTargetParams>>
) -> DmResult<()>
Set the data device’s existing table. 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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ThinPoolDev
impl Send for ThinPoolDev
impl Sync for ThinPoolDev
impl Unpin for ThinPoolDev
impl UnwindSafe for ThinPoolDev
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub 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>,