On 19/11/2025 at 19:42, Pascal Hambourg wrote:
This patchset also splits the metadata at the beginning of the disk in two: - protective MBR + primary GPT header - primary GPT partition entry array This makes it possible to see the gap between them and check if the metadata layout may interfere with the boot loader. However it would be better if the gap was not reported as free space. Is there a way to avoid this ?
I gave it some thought and came up with several solutions. Here is the one I believe is the simplest and safest:
- Restrict free space partition geometry to the intersection with gpt_disk_data->data_area or return NULL if the intersection is empty in gpt_partition_new(). - Skip free_space if NULL in _disk_alloc_freespace() and _alloc_extended_freespace().
Would this be acceptable ?
