repart: make sure to grow partition table after growing backing loopback file
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 09:36:48 +0000 (10:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 17:11:26 +0000 (18:11 +0100)
commitf9b3afae96c72564cd4cd766555845f17e3c12a9
treeae90e46f1a1d1711cdb60bc605225fcb055f89f2
parent6d18c13e79a0b3374599a3416a644a7837d5a1e6
repart: make sure to grow partition table after growing backing loopback file

This fixes the --size= switch, i.e. where we grow a disk image: after
growing it we need to expand the partition table so that its idea of the
the medium size matches the new reality. Otherwise our disk size
calculations in the subsequent steps might still use the original
ungrown size.

(This used to work, I guess this was borked when libfdisk learnt the
concept of "minimized" partition tables)
src/partition/repart.c