summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-01-21 20:00:20 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-02-25 11:31:03 +0000
commit6f0880e11d1f83ca239c823cece00fc7d034dddb (patch)
treeddde24b02d9f165331692166aab337a5a1b30c99 /perl-install/partition_table.pm
parenta5473711818b2519552561b33c3f181ab1bbfde6 (diff)
downloaddrakx-6f0880e11d1f83ca239c823cece00fc7d034dddb.tar
drakx-6f0880e11d1f83ca239c823cece00fc7d034dddb.tar.gz
drakx-6f0880e11d1f83ca239c823cece00fc7d034dddb.tar.bz2
drakx-6f0880e11d1f83ca239c823cece00fc7d034dddb.tar.xz
drakx-6f0880e11d1f83ca239c823cece00fc7d034dddb.zip
Don't tell the kernel about partition table changes when it rescans them automatically (mga#20074).
When no partitions on a DOS-partitioned disk are mounted, the kernel automatically rescans the partition table when it is written to disk. We shouldn't then try to update the kernel's view of the partition table, as the list of deltas we have recorded is relative to the previous state of the partition table, not the newly rescanned state. The behaviour for other partition table types is unchanged. v2 (tvignaud): just make base class assume the kernel doesn't reread, only mbr subclass overrides need_to_tell_kernel() in order to be smarter
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 049c7bb2e..76da83b81 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -500,7 +500,7 @@ sub write {
fs::dmraid::call_dmraid('-an');
fs::dmraid::call_dmraid('-ay');
} else {
- tell_kernel($hd, $tell_kernel);
+ tell_kernel($hd, $tell_kernel) if $hd->need_to_tell_kernel();
}
}
# get major/minor again after writing the partition table so that we got them for dynamic devices