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: &DmName, dm: &DM, segments: Vec<Segment>) -> DmResult<LinearDev>
[src]
Construct a new block device by concatenating the given segments into linear space. Warning: If the segments overlap, this method will succeed. However, the behavior of the linear device in that case should be treated as undefined. TODO: If the linear device already exists, verify that the kernel's model matches the segments argument.
fn segments(&self) -> &[Segment]
[src]
Return a reference to the segments that back this linear device.
fn extend(&mut self, new_segs: Vec<Segment>) -> DmResult<()>
[src]
Extend an existing LinearDev with additional new segments. In the event that the first segments in new_segs is contiguous with the device's last segment, these segments are coalesced into a single segment. Warning: If the segments overlap, either with each other or with the segments already in the device, this method will succeed. However, the behavior of the linear device in that case should be treated as undefined.
fn set_name(&mut self, dm: &DM, name: &DmName) -> DmResult<()>
[src]
Set the name for this LinearDev.
Trait Implementations
impl Debug for LinearDev
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl DmDevice for LinearDev
[src]
fn devnode(&self) -> PathBuf
[src]
The device's device node.
fn dstr(&self) -> String
[src]
The device's number, formatted as a string maj:min.
fn name(&self) -> &DmName
[src]
The device's name.
fn size(&self) -> Sectors
[src]
The number of sectors available for user data.
fn teardown(self, dm: &DM) -> DmResult<()>
[src]
Erase the kernel's memory of this device.