mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
activation: add _add_layer_target_to_dtree
Add function for creation of simple linear mapping over layer device.
This commit is contained in:
parent
520cc9a7f8
commit
0631d233d8
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Add _add_layer_target_to_dtree() for adding linear layer into dtree.
|
||||
Extend _cached_info() to accept layer string.
|
||||
Allow identical table reload for RAID to restore transiently failed PVs.
|
||||
vgimport '--force' now allows users to import VGs with missing PVs.
|
||||
|
@ -1831,6 +1831,25 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _add_layer_target_to_dtree(struct dev_manager *dm,
|
||||
struct dm_tree_node *dnode,
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
const char *layer_dlid;
|
||||
|
||||
if (!(layer_dlid = build_dm_uuid(dm->mem, lv->lvid.s, lv_layer(lv))))
|
||||
return_0;
|
||||
|
||||
/* Add linear mapping over layered LV */
|
||||
if (!add_linear_area_to_dtree(dnode, lv->size, lv->vg->extent_size,
|
||||
lv->vg->cmd->use_linear_target,
|
||||
lv->vg->name, lv->name) ||
|
||||
!dm_tree_node_add_target_area(dnode, NULL, layer_dlid, 0))
|
||||
return_0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _add_origin_target_to_dtree(struct dev_manager *dm,
|
||||
struct dm_tree_node *dnode,
|
||||
struct logical_volume *lv)
|
||||
|
Loading…
Reference in New Issue
Block a user