1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

restrict dm_tree_node_add_null_area

This commit is contained in:
Alasdair Kergon 2011-08-19 16:26:02 +00:00
parent 3250b38583
commit 415c0690af
3 changed files with 21 additions and 0 deletions

View File

@ -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
==================================

View File

@ -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);
/*

View File

@ -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;