Struct devicemapper::LinearDev
[−]
[src]
pub struct LinearDev { /* fields omitted */ }
A DM construct of combined Segments
Methods
impl LinearDev
[src]
Use DM to concatenate a list of segments together into a linear block device of continuous sectors.
fn new(name: &str, dm: &DM, segments: Vec<Segment>) -> DmResult<LinearDev>
Construct a new block device by concatenating the given segments into linear space. Use DM to reserve enough space for the stratis metadata on each DmDev. TODO: If the linear device already exists, verify that the kernel's model matches the segments argument.
fn segments(&self) -> &[Segment]
Return a reference to the segments that back this linear device.
fn extend(&mut self, new_segs: Vec<Segment>) -> DmResult<()>
Extend an existing LinearDev with additional new segments.
fn name(&self) -> &str
DM name - from the DeviceInfo struct
fn set_name(&mut self, dm: &DM, name: &str) -> DmResult<()>
Set the name for this LinearDev.
fn dstr(&self) -> String
Get the "x:y" device string for this LinearDev
fn size(&self) -> DmResult<Sectors>
return the total size of the linear device
fn devnode(&self) -> DmResult<PathBuf>
path of the device node
fn teardown(self, dm: &DM) -> DmResult<()>
Remove the device from DM