master - validation: check external property is matching
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=36f609e513262547aa4d92c2b55d98b1471ba2e2 Commit: 36f609e513262547aa4d92c2b55d98b1471ba2e2 Parent: 7db46c4a39fd945f295a5bd4191bd48828072d24 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Dec 17 21:58:35 2016 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sun Dec 18 19:17:59 2016 +0100
validation: check external property is matching
Detect if number of external_count is matching
referencing devices for external_origin LV.
--- WHATS_NEW | 1 + lib/metadata/merge.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.169 - ===================================== + Extend metadata validation of external origin LV use count. Fix dm table when the last user of active external origin is removed. Improve reported lvs status for active external origin volume. Fix table load for splitted RAID LV and require explicit activation.
lib/metadata/merge.c +12 -0
@@ -398,6 +398,18 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg) inc_error_count; } } + +if (lv_is_external_origin (lv)) { + seg_found =0 ; + dm_list_iterate_items(sl, &lv->segs_using_this_lv) +if (sl->seg->external_lv == lv) + seg_found++; +if (seg_found != lv->external_count) { +log_error ("LV %s: external origin count does not match." , + lv->name); + inc_error_count; + } + } } dm_list_iterate_items(seg, &lv->segments) {