mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Abort operation if dm_tree_node_add_target_area fails.
This commit is contained in:
parent
3a8eb3870e
commit
86b15c7c90
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.86 -
|
Version 2.02.86 -
|
||||||
=================================
|
=================================
|
||||||
|
Abort operation if dm_tree_node_add_target_area fails.
|
||||||
Add activation/checks to lvm.conf to perform additional ioctl validation.
|
Add activation/checks to lvm.conf to perform additional ioctl validation.
|
||||||
When suspending, automatically preload newly-visible existing LVs.
|
When suspending, automatically preload newly-visible existing LVs.
|
||||||
Report internal error when parameters are missing on table load.
|
Report internal error when parameters are missing on table load.
|
||||||
|
@ -1178,12 +1178,11 @@ static int _add_error_area(struct dev_manager *dm, struct dm_tree_node *node,
|
|||||||
dlid = _add_error_device(dm, *tree, seg, s);
|
dlid = _add_error_device(dm, *tree, seg, s);
|
||||||
if (!dlid)
|
if (!dlid)
|
||||||
return_0;
|
return_0;
|
||||||
dm_tree_node_add_target_area(node, NULL, dlid,
|
if (!dm_tree_node_add_target_area(node, NULL, dlid, extent_size * seg_le(seg, s)))
|
||||||
extent_size * seg_le(seg, s));
|
return_0;
|
||||||
} else
|
} else
|
||||||
dm_tree_node_add_target_area(node,
|
if (!dm_tree_node_add_target_area(node, dm->cmd->stripe_filler, NULL, UINT64_C(0)))
|
||||||
dm->cmd->stripe_filler,
|
return_0;
|
||||||
NULL, UINT64_C(0));
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1204,19 +1203,15 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
|
|||||||
(seg_type(seg, s) == AREA_LV && !seg_lv(seg, s))) {
|
(seg_type(seg, s) == AREA_LV && !seg_lv(seg, s))) {
|
||||||
if (!_add_error_area(dm, node, seg, s))
|
if (!_add_error_area(dm, node, seg, s))
|
||||||
return_0;
|
return_0;
|
||||||
} else if (seg_type(seg, s) == AREA_PV)
|
} else if (seg_type(seg, s) == AREA_PV) {
|
||||||
dm_tree_node_add_target_area(node,
|
if (!dm_tree_node_add_target_area(node, dev_name(seg_dev(seg, s)), NULL,
|
||||||
dev_name(seg_dev(seg, s)),
|
(seg_pv(seg, s)->pe_start + (extent_size * seg_pe(seg, s)))))
|
||||||
NULL,
|
return_0;
|
||||||
(seg_pv(seg, s)->pe_start +
|
} else if (seg_type(seg, s) == AREA_LV) {
|
||||||
(extent_size * seg_pe(seg, s))));
|
if (!(dlid = build_dm_uuid(dm->mem, seg_lv(seg, s)->lvid.s, NULL)))
|
||||||
else if (seg_type(seg, s) == AREA_LV) {
|
return_0;
|
||||||
if (!(dlid = build_dm_uuid(dm->mem,
|
if (!dm_tree_node_add_target_area(node, NULL, dlid, extent_size * seg_le(seg, s)))
|
||||||
seg_lv(seg, s)->lvid.s,
|
|
||||||
NULL)))
|
|
||||||
return_0;
|
return_0;
|
||||||
dm_tree_node_add_target_area(node, NULL, dlid,
|
|
||||||
extent_size * seg_le(seg, s));
|
|
||||||
} else {
|
} else {
|
||||||
log_error(INTERNAL_ERROR "Unassigned area found in LV %s.",
|
log_error(INTERNAL_ERROR "Unassigned area found in LV %s.",
|
||||||
seg->lv->name);
|
seg->lv->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user