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

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.
This commit is contained in:
Zdenek Kabelac 2013-05-30 11:19:28 +02:00
parent b08c346489
commit e4dfa785d1

View File

@ -1598,7 +1598,7 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
info.minor); info.minor);
r = 0; r = 0;
continue; continue;
} else if (info.suspended) } else if (info.suspended && info.live_table)
dec_suspended(); dec_suspended();
if (child->callback && if (child->callback &&