mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
restrict dm_tree_node_add_null_area
This commit is contained in:
parent
735254fba4
commit
6ab3b611c7
@ -1,5 +1,6 @@
|
||||
Version 1.02.67 -
|
||||
==================================
|
||||
Add dm_tree_node_add_null_area for temporarily-missing raid devs tracked.
|
||||
|
||||
Version 1.02.66 - 12th August 2011
|
||||
==================================
|
||||
|
@ -516,6 +516,10 @@ int dm_tree_node_add_target_area(struct dm_tree_node *node,
|
||||
const char *dev_name,
|
||||
const char *dlid,
|
||||
uint64_t offset);
|
||||
|
||||
/*
|
||||
* Only for temporarily-missing raid devices where changes are tracked.
|
||||
*/
|
||||
int dm_tree_node_add_null_area(struct dm_tree_node *node, uint64_t offset);
|
||||
|
||||
/*
|
||||
|
@ -2629,6 +2629,22 @@ int dm_tree_node_add_null_area(struct dm_tree_node *node, uint64_t offset)
|
||||
|
||||
seg = dm_list_item(dm_list_last(&node->props.segs), struct load_segment);
|
||||
|
||||
switch (seg->type) {
|
||||
case SEG_RAID1:
|
||||
case SEG_RAID4:
|
||||
case SEG_RAID5_LA:
|
||||
case SEG_RAID5_RA:
|
||||
case SEG_RAID5_LS:
|
||||
case SEG_RAID5_RS:
|
||||
case SEG_RAID6_ZR:
|
||||
case SEG_RAID6_NR:
|
||||
case SEG_RAID6_NC:
|
||||
break;
|
||||
default:
|
||||
log_error("dm_tree_node_add_null_area() called on an unsupported segment type");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_add_area(node, seg, NULL, offset))
|
||||
return_0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user