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.85/lib/activate/dev_manager.c =================================================================== --- LVM2.2.02.85.orig/lib/activate/dev_manager.c 2011-05-23 15:59:49.000000000 +0200 +++ LVM2.2.02.85/lib/activate/dev_manager.c 2011-05-23 15:59:59.000000000 +0200 @@ -1204,7 +1204,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, unsigned origin_only) +static struct dm_tree *_create_partial_dtree(struct dev_manager *dm, struct logical_volume *lv, unsigned origin_only, int action) { struct dm_tree *dtree; struct dm_list *snh, *snht; @@ -1232,7 +1232,7 @@ static struct dm_tree *_create_partial_d if (!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s), 0)) goto_bad; } - if (seg->origin) + if ((action == PRELOAD || action == ACTIVATE) && seg->origin) _add_lv_to_dtree(dm, dtree, seg->origin, 0); } @@ -1834,7 +1834,7 @@ static int _tree_action(struct dev_manag char *dlid; int r = 0; - if (!(dtree = _create_partial_dtree(dm, lv, origin_only))) + if (!(dtree = _create_partial_dtree(dm, lv, origin_only, action))) return_0; if (!(root = dm_tree_find_node(dtree, 0, 0))) {