summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2013-05-30 11:19:28 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2013-05-30 17:35:23 +0200
commite4dfa785d14643e1efd298af1040f461704b0a67 (patch)
tree18b1366792009c00e61a566086a1dd895838d8cf
parentb08c3464898f1c1e45fcac95258a495286e4dd47 (diff)
downloadlvm2-e4dfa785d14643e1efd298af1040f461704b0a67.tar.gz
libdm: compensate suspend counter for live table
This patch may not be fully correct. It tries to solve the imbalanced suspend counter. The problem starts when some LV is created and fails in resume path. (i.e. resuming to large PV (enforced) over small loop devices) This fails in _resume_node() after dm_task_run(). And while existing device with empty table is left in inactive table, further calls are reporting this device is in suspend state. When later the lvm2 tries to rollback created device and deactivate it, it will end with internal error, when we try to decrement never incremented suspend counter. As an 'easy fix' for now update suspend counter only for live nodes. TODO: explore better fix.
-rw-r--r--libdm/libdm-deptree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index 2201b30d7..4482296e1 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -1598,7 +1598,7 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
info.minor);
r = 0;
continue;
- } else if (info.suspended)
+ } else if (info.suspended && info.live_table)
dec_suspended();
if (child->callback &&