Struct devicemapper::CacheDev
[−]
[src]
pub struct CacheDev { /* fields omitted */ }DM Cache device
Methods
impl CacheDev[src]
Cache device implementation.
fn new(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
cache: LinearDev,
origin: LinearDev,
cache_block_size: Sectors
) -> DmResult<CacheDev>[src]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
cache: LinearDev,
origin: LinearDev,
cache_block_size: Sectors
) -> DmResult<CacheDev>
Construct a new CacheDev with the given data and meta devs. Returns an error if the device is already known to the kernel.
fn setup(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
cache: LinearDev,
origin: LinearDev,
cache_block_size: Sectors
) -> DmResult<CacheDev>[src]
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
meta: LinearDev,
cache: LinearDev,
origin: LinearDev,
cache_block_size: Sectors
) -> DmResult<CacheDev>
Set up a cache device from the given metadata and data devices.
fn set_origin_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 origin device. 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.
fn status(&self, dm: &DM) -> DmResult<CacheDevStatus>[src]
Get the current status of the cache device.
Trait Implementations
impl Debug for CacheDev[src]
impl DmDevice<CacheDevTargetTable> for CacheDev[src]
fn device(&self) -> Device[src]
The device.
fn devnode(&self) -> PathBuf[src]
The device's device node.
fn equivalent_tables(
left: &CacheDevTargetTable,
right: &CacheDevTargetTable
) -> DmResult<bool>[src]
left: &CacheDevTargetTable,
right: &CacheDevTargetTable
) -> DmResult<bool>
Check if tables indicate an equivalent device.
fn name(&self) -> &DmName[src]
The device's name.
fn size(&self) -> Sectors[src]
The number of sectors available for user data.
fn table(&self) -> &CacheDevTargetTable[src]
What the device thinks its table is.
fn teardown(self, dm: &DM) -> DmResult<()>[src]
Erase the kernel's memory of this device.
fn uuid(&self) -> Option<&DmUuid>[src]
The device's UUID, if available. Note that the UUID is not any standard UUID format. Read more
fn load_table(dm: &DM, id: &DevId) -> DmResult<T>[src]
The devicemapper table