From: Yu Watanabe Date: Thu, 23 Oct 2025 00:35:03 +0000 (+0900) Subject: rereadpt: always update kernel partition tables from userspace in an incremental... X-Git-Tag: v259-rc1~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5962d3327be5b079d9cbb85740300c069441b34;p=thirdparty%2Fsystemd.git rereadpt: always update kernel partition tables from userspace in an incremental fashion (#39390) 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 --- a5962d3327be5b079d9cbb85740300c069441b34