]> sourceware.org Git - lvm2.git/commitdiff
devicemapper: retry remove even for subLVs
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 8 Nov 2018 11:12:58 +0000 (12:12 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 8 Nov 2018 11:20:57 +0000 (12:20 +0100)
With older systems and udevs we don't have control over scanning of lvm2
internal devices - so far we set retry-removal only for top-level LVs,
but in occasional cases udev can be 'fast enough' to open device for
scanning and prevent removal of such device from DM table.

So to combat this case - try to pass 'retry' flag also for removal of
internal device so see how many races can go away with this simple
patch.

Note: patch is applied only to internal version of libdm so the external
API remains working in the old way for now.

device_mapper/libdm-deptree.c

index 89a0a4855b63dccaeeaf2a2897929b1a542a7bf9..06f10aefe08b9c4e4d55aeb9e526771715c21cd3 100644 (file)
@@ -1804,7 +1804,7 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
 
                if (!_deactivate_node(name, info.major, info.minor,
                                      &child->dtree->cookie, child->udev_flags,
-                                     (level == 0) ? child->dtree->retry_remove : 0)) {
+                                     child->dtree->retry_remove)) {
                        log_error("Unable to deactivate %s (" FMTu32 ":"
                                  FMTu32 ").", name, info.major, info.minor);
                        r = 0;
This page took 0.039754 seconds and 5 git commands to generate.