1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

devicemapper: retry remove even for subLVs

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.
This commit is contained in:
Zdenek Kabelac 2018-11-08 12:12:58 +01:00 committed by David Teigland
parent 205b4f0146
commit dbe0a79f03

View File

@ -1792,7 +1792,7 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
if (!_deactivate_node(name, info.major, info.minor, if (!_deactivate_node(name, info.major, info.minor,
&child->dtree->cookie, child->udev_flags, &child->dtree->cookie, child->udev_flags,
(level == 0) ? child->dtree->retry_remove : 0)) { child->dtree->retry_remove)) {
log_error("Unable to deactivate %s (" FMTu32 ":" log_error("Unable to deactivate %s (" FMTu32 ":"
FMTu32 ").", name, info.major, info.minor); FMTu32 ").", name, info.major, info.minor);
r = 0; r = 0;