Mageia Bugzilla – Attachment 8927 Details for
Bug 20074
Partitions with Type: Empty corrupt the partition table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Patch to fix another partition table sync problem
0001-Fix-erratic-behaviour-when-telling-kernel-to-delete-.patch (text/plain), 1.42 KB, created by
Martin Whitaker
on 2017-02-04 21:03:20 CET
(
hide
)
Description:
Patch to fix another partition table sync problem
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-02-04 21:03:20 CET
Size:
1.42 KB
patch
obsolete
>From ebdc1fbd327e701d344906b228b2344339f56bec Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sat, 4 Feb 2017 17:11:10 +0000 >Subject: [PATCH] Fix erratic behaviour when telling kernel to delete > partitions (mga#20074). > >When telling the kernel about changes to a DOS partition table, if a >partition was deleted on a disk that also contained an Empty partition, >the kernel also removed the Empty partition from its cached partition >table (and renumbered the other partitions). > >Experimentation showed that leaving the udev exec queue active whilst we >were telling the kernel about the changes fixed this problem, although I >don't have an explanation for why it does. > >diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm >index 955a71a..2a226b7 100644 >--- a/perl-install/partition_table.pm >+++ b/perl-install/partition_table.pm >@@ -425,8 +425,6 @@ sub tell_kernel { > > my $F = partition_table::raw::openit($hd); > >- run_program::run('udevadm', 'control', '--stop-exec-queue'); >- > my $force_reboot = any { $_->[0] eq 'force_reboot' } @$tell_kernel; > if (!$force_reboot) { > foreach (@$tell_kernel) { >@@ -441,8 +439,6 @@ sub tell_kernel { > } > } > >- run_program::run('udevadm', 'control', '--start-exec-queue'); >- > if ($force_reboot) { > # FIXME Handle LVM/dmcrypt/RAID > my @magic_parts = grep { $_->{isMounted} && $_->{real_mntpoint} } get_normal_parts($hd); >-- >2.10.2 >
From ebdc1fbd327e701d344906b228b2344339f56bec Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sat, 4 Feb 2017 17:11:10 +0000 Subject: [PATCH] Fix erratic behaviour when telling kernel to delete partitions (mga#20074). When telling the kernel about changes to a DOS partition table, if a partition was deleted on a disk that also contained an Empty partition, the kernel also removed the Empty partition from its cached partition table (and renumbered the other partitions). Experimentation showed that leaving the udev exec queue active whilst we were telling the kernel about the changes fixed this problem, although I don't have an explanation for why it does. diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 955a71a..2a226b7 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -425,8 +425,6 @@ sub tell_kernel { my $F = partition_table::raw::openit($hd); - run_program::run('udevadm', 'control', '--stop-exec-queue'); - my $force_reboot = any { $_->[0] eq 'force_reboot' } @$tell_kernel; if (!$force_reboot) { foreach (@$tell_kernel) { @@ -441,8 +439,6 @@ sub tell_kernel { } } - run_program::run('udevadm', 'control', '--start-exec-queue'); - if ($force_reboot) { # FIXME Handle LVM/dmcrypt/RAID my @magic_parts = grep { $_->{isMounted} && $_->{real_mntpoint} } get_normal_parts($hd); -- 2.10.2
View Attachment As Raw
Actions:
View
Attachments on
bug 20074
:
8880
|
8881
|
8882
|
8883
|
8901
|
8906
|
8907
|
8908
|
8909
|
8926
| 8927 |
8972