Patchwork [02/12] kpartx: don't delete partitions from partitions

login
register
mail settings
Submitter Benjamin Marzinski
Date Dec. 7, 2017, 6:48 p.m.
Message ID <1512672546-12785-3-git-send-email-bmarzins@redhat.com>
Download mbox | patch
Permalink /patch/10100847/
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Comments

Benjamin Marzinski - Dec. 7, 2017, 6:48 p.m.
The current del-part-nodes rules try to run partx on the partitions
themselves, which will ofen fail with an error in the log, because the
partitions will have been deleted before partx can run on them.

Cc: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 kpartx/del-part-nodes.rules | 1 +
 1 file changed, 1 insertion(+)
Martin Wilck - Dec. 7, 2017, 10:09 p.m.
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote:
> The current del-part-nodes rules try to run partx on the partitions
> themselves, which will ofen fail with an error in the log, because
> the
> partitions will have been deleted before partx can run on them.
> 
> Cc: Martin Wilck <mwilck@suse.com>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>

Patch

diff --git a/kpartx/del-part-nodes.rules b/kpartx/del-part-nodes.rules
index cee945d..17bc505 100644
--- a/kpartx/del-part-nodes.rules
+++ b/kpartx/del-part-nodes.rules
@@ -12,6 +12,7 @@ 
 SUBSYSTEM!="block", GOTO="end_del_part_nodes"
 KERNEL!="sd*|dasd*|rbd*", GOTO="end_del_part_nodes"
 ACTION!="add|change", GOTO="end_del_part_nodes"
+ENV{DEVTYPE}=="partition", GOTO="end_del_part_nodes"
 
 IMPORT{cmdline}="dont_del_part_nodes"
 ENV{dont_del_part_nodes}=="1", GOTO="end_del_part_nodes"