Don't deactivate origin when deactivating a snapshot. Populate the deptree selectivaly according to the action performed. Signed-off-by: Mikulas Patocka --- lib/activate/dev_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: LVM2.2.02.54/lib/activate/dev_manager.c =================================================================== --- LVM2.2.02.54.orig/lib/activate/dev_manager.c 2009-10-29 20:30:32.000000000 +0100 +++ LVM2.2.02.54/lib/activate/dev_manager.c 2009-10-29 20:31:19.000000000 +0100 @@ -866,7 +866,7 @@ static int _add_lv_to_dtree(struct dev_m return 1; } -static struct dm_tree *_create_partial_dtree(struct dev_manager *dm, struct logical_volume *lv) +static struct dm_tree *_create_partial_dtree(struct dev_manager *dm, struct logical_volume *lv, int action) { struct dm_tree *dtree; struct dm_list *snh, *snht; @@ -893,7 +893,7 @@ static struct dm_tree *_create_partial_d if (!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s))) goto_bad; } - if (seg->origin) + if ((action == PRELOAD || action == ACTIVATE) && seg->origin) _add_lv_to_dtree(dm, dtree, seg->origin); } @@ -1372,7 +1372,7 @@ static int _tree_action(struct dev_manag char *dlid; int r = 0; - if (!(dtree = _create_partial_dtree(dm, lv))) + if (!(dtree = _create_partial_dtree(dm, lv, action))) return_0; if (!(root = dm_tree_find_node(dtree, 0, 0))) {