1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cache: fix clean_tree

Fix 8121074fda - the patch
incorrectly removed also other top-level nodes.

It needs to deactivate purely subnodes of _corig.
This commit is contained in:
Zdenek Kabelac 2014-11-12 09:34:46 +01:00
parent 112302d41a
commit 57c618b0ed
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.113 -
=====================================
Fix clean_tree after activation/resume for cache target (2.02.112).
Version 2.02.112 - 11th November 2014
=====================================

View File

@ -3001,11 +3001,12 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, char *
if (non_toplevel_tree_dlid && !strcmp(non_toplevel_tree_dlid, uuid))
continue;
if ((name = strstr(lvname, "_corig")) && !name[6]) {
/* FIXME: for now just for _corig deactivate LVM subtree, should be generic */
if (!dm_tree_deactivate_children(root, "LVM-", 4))
return_0;
} else if (!dm_tree_deactivate_children(root, uuid, strlen(uuid)))
if ((name = strstr(lvname, "_corig")) && !name[6] &&
/* FIXME: for now just for _corig deactivate LVM subtree, should be generic */
!dm_tree_deactivate_children(child, "LVM-", 4))
return_0;
if (!dm_tree_deactivate_children(root, uuid, strlen(uuid)))
return_0;
}