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

libdm: avoid resume if preloaded device is smaller

When we preload device with smaller size, we avoid its resume,
so later suspend/resume of full device tree my process all
existing in flight bios.

Also update comment and avoid using confusing opposite meaning.
This commit is contained in:
Zdenek Kabelac 2017-02-10 19:57:04 +01:00
parent 035c614c19
commit c908a8b131
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.138 - Version 1.02.138 -
===================================== =====================================
Avoids immediate resume when preloaded device is smaller.
Do not suppress kernel key description in dmsetup table output. Do not suppress kernel key description in dmsetup table output.
Support configurable command executed from dmeventd thin plugin. Support configurable command executed from dmeventd thin plugin.
Support new R|r human readable units output format. Support new R|r human readable units output format.

View File

@ -2874,8 +2874,8 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
else if (child->props.size_changed < 0) else if (child->props.size_changed < 0)
dnode->props.size_changed = -1; dnode->props.size_changed = -1;
/* Resume device immediately if it has parents and its size changed */ /* No resume for a device without parents or with unchanged or smaller size */
if (!dm_tree_node_num_children(child, 1) || !child->props.size_changed) if (!dm_tree_node_num_children(child, 1) || (child->props.size_changed <= 0))
continue; continue;
if (!node_created && (dm_list_size(&child->props.segs) == 1)) { if (!node_created && (dm_list_size(&child->props.segs) == 1)) {