<feed xmlns='http://www.w3.org/2005/Atom'>
<title>drakx/perl-install/partition_table, branch 2.65</title>
<subtitle>Mageia Installer and base platform for many utilities</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/'/>
<entry>
<title>Minimise calls to ped_disk_probe() when writing partition tables.</title>
<updated>2019-04-20T20:35:26+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2019-04-20T10:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=9602565a6c602906acb96c3192d8ff168ef5ebea'/>
<id>9602565a6c602906acb96c3192d8ff168ef5ebea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Minimise calls to ped_disk_probe() when reading partition tables (mga#15752)</title>
<updated>2019-04-20T20:35:26+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2019-04-20T10:02:52+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=2fe536b25f66c52a75ed8c53cd5f14d9e795d6a3'/>
<id>2fe536b25f66c52a75ed8c53cd5f14d9e795d6a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>enhance partition_table doc</title>
<updated>2018-11-22T15:04:19+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2018-11-22T14:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=280850cbe303d140ae7733f73bcb17c5903b60ed'/>
<id>280850cbe303d140ae7733f73bcb17c5903b60ed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add safety net for informing the kernel after writing a DOS partition table.</title>
<updated>2017-04-04T18:04:47+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-04-02T18:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=23db13194282cfff24d4bc88a7790ebd272953a0'/>
<id>23db13194282cfff24d4bc88a7790ebd272953a0</id>
<content type='text'>
There is an unidentified condition that prevents udevd calling the
BLKRRPART ioctl after a partition table is written. It looks like
either the kernel or udevd drops device change events if they are
too closely spaced in time. So, in the case where we expect udevd
to call BLKRRPART, check /proc/partitions to make sure it has done
so. Arbitrarily try 5 times, 100ms apart, before giving up and
informing the kernel ourselves.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is an unidentified condition that prevents udevd calling the
BLKRRPART ioctl after a partition table is written. It looks like
either the kernel or udevd drops device change events if they are
too closely spaced in time. So, in the case where we expect udevd
to call BLKRRPART, check /proc/partitions to make sure it has done
so. Arbitrarily try 5 times, 100ms apart, before giving up and
informing the kernel ourselves.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure kernel is informed when a DOS partition table is cleared.</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-12T18:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=af4fa8371fa40bb5012a7af40f0f667059e8a138'/>
<id>af4fa8371fa40bb5012a7af40f0f667059e8a138</id>
<content type='text'>
diskdrake allows the user to clear all partitions even when some of those
partitions are currently mounted. partition_table::dos::need_to_tell_kernel()
must return true in this case, as the automatic reread of the partition table
triggered by udevd will fail.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
diskdrake allows the user to clear all partitions even when some of those
partitions are currently mounted. partition_table::dos::need_to_tell_kernel()
must return true in this case, as the automatic reread of the partition table
triggered by udevd will fail.
</pre>
</div>
</content>
</entry>
<entry>
<title>When writing a GPT partition table, merge all actions into a single commit.</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-05T19:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=679ea1e5ab5c570b461cf3dacfe0fb61a04e9d79'/>
<id>679ea1e5ab5c570b461cf3dacfe0fb61a04e9d79</id>
<content type='text'>
This avoids unnecessary udev events, which in some cases were causing
udevd to trigger a kernel partition table reread, causing the kernel
to get out of sync with drakx.

In order to do so, the libparted bindings are enhanced so that we
manipulate a 'ped_disk' object:
- disk_open() returns such an object
- set_disk_type() is removed
- disk_commit() writes back the partition table and tell the kernel
  about it
  if we fails to write the partition table, we let
  partition_table::write() fire an exceptionc
  if we only have succeed in writing the partition table, we let
  partition_table::write() try harder (umounting partitions before
  trying againt to tell the kernel again)
- need_to_tell_kernel() is overrided

The last change is needed because we now tell the kernel about the new
partition layout in partition_table::gpt::write() when calling
disk_commit() while previously we were deferring that to
partition_table::write() which after having called the gpt's write()
calls tell_kernel() -&gt; c::tell_kernel_to_reread_partition_table()

So we must tell partition_table::write() that telling the kernel to
reread the partition_table is not needed if we already succeeded in
that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids unnecessary udev events, which in some cases were causing
udevd to trigger a kernel partition table reread, causing the kernel
to get out of sync with drakx.

In order to do so, the libparted bindings are enhanced so that we
manipulate a 'ped_disk' object:
- disk_open() returns such an object
- set_disk_type() is removed
- disk_commit() writes back the partition table and tell the kernel
  about it
  if we fails to write the partition table, we let
  partition_table::write() fire an exceptionc
  if we only have succeed in writing the partition table, we let
  partition_table::write() try harder (umounting partitions before
  trying againt to tell the kernel again)
- need_to_tell_kernel() is overrided

The last change is needed because we now tell the kernel about the new
partition layout in partition_table::gpt::write() when calling
disk_commit() while previously we were deferring that to
partition_table::write() which after having called the gpt's write()
calls tell_kernel() -&gt; c::tell_kernel_to_reread_partition_table()

So we must tell partition_table::write() that telling the kernel to
reread the partition_table is not needed if we already succeeded in
that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant code when initialising a partition table.</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-04T12:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=299738fd1af3a9d854e00a2c3a4e743cf6ec15f4'/>
<id>299738fd1af3a9d854e00a2c3a4e743cf6ec15f4</id>
<content type='text'>
Now we force the kernel to reread the partition table when we initialise
it, there's no need to also inform it that we've deleted all the existing
partitions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now we force the kernel to reread the partition table when we initialise
it, there's no need to also inform it that we've deleted all the existing
partitions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revised fix for clearing GPT partitions during automatic install.</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-04T12:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=ca515b773e51493aee36d67a5893af33101493b1'/>
<id>ca515b773e51493aee36d67a5893af33101493b1</id>
<content type='text'>
This reverts commit 532fd1d60df306e204bae79c5158ca2302739966, which
introduced a new bug when clearing GPT partitions in an interactive
session (mga#20264), and replaces it with a new solution.

When a partition table is initialised, we now add an 'init' action to
the $hd-&gt;{will_tell_kernel} list. This is used both by gpt::write()
(to clear the partition table) and by partition_table::tell_kernel()
(to force the kernel to reread the partition table). Previous changes
stored in $hd-&gt;{will_tell_kernel} are discarded, as they are no longer
of interest.

This also removes support for the will_tell_kernel 'force_reboot'
action, as nothing uses that any more.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 532fd1d60df306e204bae79c5158ca2302739966, which
introduced a new bug when clearing GPT partitions in an interactive
session (mga#20264), and replaces it with a new solution.

When a partition table is initialised, we now add an 'init' action to
the $hd-&gt;{will_tell_kernel} list. This is used both by gpt::write()
(to clear the partition table) and by partition_table::tell_kernel()
(to force the kernel to reread the partition table). Previous changes
stored in $hd-&gt;{will_tell_kernel} are discarded, as they are no longer
of interest.

This also removes support for the will_tell_kernel 'force_reboot'
action, as nothing uses that any more.
</pre>
</div>
</content>
</entry>
<entry>
<title>make "(add, " messages end in logs</title>
<updated>2017-03-06T09:58:36+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2017-03-02T15:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=4319d6997c99f14ef6f33279fe030a004de56f95'/>
<id>4319d6997c99f14ef6f33279fe030a004de56f95</id>
<content type='text'>
rather than lost on console
printf() was introduced in commit 9e6b327ca2b1f46db62e0811fabf0a6cf0b114a7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rather than lost on console
printf() was introduced in commit 9e6b327ca2b1f46db62e0811fabf0a6cf0b114a7
</pre>
</div>
</content>
</entry>
<entry>
<title>Always tell the kernel about partition table changes when running the classic installer (mga#20074).</title>
<updated>2017-02-25T11:47:26+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-02-20T21:42:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=37a48c57d0c295e29049d23d1d37a800e1ee24af'/>
<id>37a48c57d0c295e29049d23d1d37a800e1ee24af</id>
<content type='text'>
The automatic rescan of the partition table is triggered by udevd. The
udev rule that causes this is not present on the cut-down system that
runs the classic installer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The automatic rescan of the partition table is triggered by udevd. The
udev rule that causes this is not present on the cut-down system that
runs the classic installer.
</pre>
</div>
</content>
</entry>
</feed>
