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

libdm: drop callback on revert path

The system is likely in some very inconsisten state.
Do not try to make it even more problematic with trying
to invoke tools like thin_check via callback.
This commit is contained in:
Zdenek Kabelac 2016-12-17 22:40:59 +01:00
parent 29b0e42be3
commit 954c59779d
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.138 - Version 1.02.138 -
===================================== =====================================
Do not try call callback when reverting activation on error path.
Fix file mapping for extents with physically adjacent extents. Fix file mapping for extents with physically adjacent extents.
Validation vsnprintf result in runtime translate of dm_log (1.02.136). Validation vsnprintf result in runtime translate of dm_log (1.02.136).
Separate filemap extent allocation from region table. Separate filemap extent allocation from region table.

View File

@ -2778,6 +2778,10 @@ static int _dm_tree_revert_activated(struct dm_tree_node *parent)
dm_list_iterate_items_gen(child, &parent->activated, activated_list) { dm_list_iterate_items_gen(child, &parent->activated, activated_list) {
log_debug_activation("Reverting %s.", child->name); log_debug_activation("Reverting %s.", child->name);
if (child->callback) {
log_debug_activation("Dropping callback for %s.", child->name);
child->callback = NULL;
}
if (!_deactivate_node(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)) { &child->dtree->cookie, child->udev_flags, 0)) {
log_error("Unable to deactivate %s (%" PRIu32 log_error("Unable to deactivate %s (%" PRIu32