]> sourceware.org Git - lvm2.git/commitdiff
libdm: avoid resume if preloaded device is smaller
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 10 Feb 2017 18:57:04 +0000 (19:57 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 10 Feb 2017 19:29:11 +0000 (20:29 +0100)
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.

WHATS_NEW_DM
libdm/libdm-deptree.c

index ac2d420200f97537c85e1779e1c1d7c386f570d0..47f647a6acca62752bfd1b849f2103eaf85d6705 100644 (file)
@@ -1,5 +1,6 @@
 Version 1.02.138 - 
 =====================================
+  Avoids immediate resume when preloaded device is smaller.
   Do not suppress kernel key description in dmsetup table output.
   Support configurable command executed from dmeventd thin plugin.
   Support new R|r human readable units output format.
index 9570b8abbaadc9c703e6b38d66fe6191c94eeecb..d658bf99de5d980c96ca836d75f6c1f30f8df2df 100644 (file)
@@ -2874,8 +2874,8 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
                else if (child->props.size_changed < 0)
                        dnode->props.size_changed = -1;
 
-               /* Resume device immediately if it has parents and its size changed */
-               if (!dm_tree_node_num_children(child, 1) || !child->props.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 <= 0))
                        continue;
 
                if (!node_created && (dm_list_size(&child->props.segs) == 1)) {
This page took 0.043645 seconds and 5 git commands to generate.