]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rereadpt: always update kernel partition tables from userspace in an incremental...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Oct 2025 00:35:03 +0000 (09:35 +0900)
committerGitHub <noreply@github.com>
Thu, 23 Oct 2025 00:35:03 +0000 (09:35 +0900)
Let's address #38672 comprehensively: let's avoid BLKRRPART as much as
we can, and always do careful userspace controlled, incremental updates
to the kernel partition tables.

This simply iterates through blkid's partition parsing, and turns it
into a BLKPG ioctls, adding, updating, removing partitions as necessary,
suppressing unnecessary changes. This has the major benefit that the
call becomes truly idempotent: if nothing changed then nothing is
removed/readed, like BLKRRPART is doing it.

This then ports over all code currently doing partition refreshing,
specifcially: udev, repart, and homed.

Fixes: #38672

Trivial merge