1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

deptree: don't remove live node on resume failure

When resuming a node needed by a higher layer of the tree,
if the resume fails, only remove it if the node did not
originally have a live table.

Ref. 97f8454ecc
This commit is contained in:
Alasdair G Kergon 2013-07-23 13:33:35 +01:00
parent 84801d7c34
commit 83fb622598

View File

@ -2534,12 +2534,15 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
log_error("Unable to resume %s (%" PRIu32
":%" PRIu32 ")", child->name, child->info.major,
child->info.minor);
if (!_deactivate_node(child->name, child->info.major, child->info.minor,
/* If the device was not previously active, we might as well remove this node. */
if (!child->info.live_table &&
!_deactivate_node(child->name, child->info.major,child->info.minor,
&child->dtree->cookie, child->udev_flags, 0))
log_error("Unable to deactivate %s (%" PRIu32
":%" PRIu32 ")", child->name, child->info.major,
child->info.minor);
r = 0;
/* Each child is handled independently */
continue;
}