master - activation: fix pvmove partial tree creation
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=71f49345004d385acc71a8e534c4313069cc59b6 Commit: 71f49345004d385acc71a8e534c4313069cc59b6 Parent: b73de7315116da41a993d20567f9a1520610f545 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Feb 23 12:09:12 2013 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sat Feb 23 12:09:12 2013 +0100
activation: fix pvmove partial tree creation
Do not try to add LV again into the partial tree, if it's been already added. Otherwise we may end in endless loop.
--- lib/activate/dev_manager.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
lib/activate/dev_manager.c +2 -1
@@ -1605,7 +1605,8 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,/* Add any LVs referencing a PVMOVE LV unless told not to. */ if (dm->track_pvmove_deps && lv->status &PVMOVE ) dm_list_iterate_items(sl, &lv->segs_using_this_lv) -if (!_add_lv_to_dtree (dm, dtree, sl->seg->lv, origin_only)) +if (!_cached_info (dm->mem, dtree, sl->seg->lv,0 ) && + !_add_lv_to_dtree (dm, dtree, sl->seg->lv, origin_only)) return_0;/* Adding LV head of replicator adds all other related devs */