master - libdm: deactivate failed node in preload
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=97f8454eccefe29464336ba1823448f4d1fa009b Commit: 97f8454eccefe29464336ba1823448f4d1fa009b Parent: ade2f47829f66d061d69844b9911e266751435b7 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sun Dec 2 16:32:42 2012 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sun Dec 2 17:59:40 2012 +0100
libdm: deactivate failed node in preload
If the resume of preloaded node fails, do not leave such node in the table - since it may not be easy to detach such node later when the node is i.e. internal.
i.e. failing activation of the thin pool with mismatching chunk size may leave -tpool device in the table, which could have been then removed only by dmsetup command.
--- WHATS_NEW_DM | 1 + libdm/libdm-deptree.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-)
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.78 - =================================== + Automatically deactivate failed preloaded dm tree node. Add DM_DISABLE_UDEV environment variable to manage dev nodes by libdm only. Fix dm_task_set_cookie to properly process udev flags if udev_sync disabled.
libdm/libdm-deptree.c +5 -0
@@ -2496,6 +2496,11 @@ 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, + &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 ;continue ; }