Add GPT partition identity to ZInfoStorage#146
Conversation
| // Per filesystem/partition information | ||
| // Per filesystem/partition information. | ||
| // | ||
| // Block-partition entries (device != "") carry GPT identification in |
There was a problem hiding this comment.
This comment is a bit odd. Device carrying GPT identification will be block devices like sda, sdb, etc, not sda1, sda2, sda3 which represents the partition itself.... and why device != "". Please, review the comment...
There was a problem hiding this comment.
The device field can be either /dev/sda or /dev/sdaN and all of those are block devices in Linux.
The comment refers to the underying disk (aka /dev/sda) being GPT.
The GPT info is contained in /dev/sda but is associated with the partitions.
So I don't see anything wrong in the comments - maybe this can be made more clear somehow. Let me try.
There was a problem hiding this comment.
You're right — "block-partition" lumped whole disks and partitions together, and device != "" is the wrong gate (the empty-device case is the directory entries from ReportDirPaths, not whole-disk entries).
Rewrote the comments in the latest force-push: dropped the umbrella note and made each field's comment state its own emptiness rules — the GPT fields are set only when the entry is a GPT partition, and empty for whole-disk entries (e.g. sda), for partitions on non-GPT disks, and for directory entries.
Add partitionLabel, partitionTypeGuid, and partitionUuid so a controller can tell which ZInfoStorage entry is the EFI partition, which is IMGA vs IMGB, and how large each of them is on a given device. ZInfoDevice.storageList today lists every block partition by raw device name only, so role-keyed sizes (EFI, CONFIG, IMGA, IMGB, P3) cannot be read off it. The new fields are the GPT PARTLABEL, partition-type GUID, and PARTUUID — the same identifiers EVE's boot path uses to resolve IMGA/IMGB/CONFIG. Appended as 5/6/7 and empty for non-GPT or directory-only entries; existing clients remain wire-compatible. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No functional changes; generated code and assets only. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5344d71 to
81aecec
Compare
Pulls in lf-edge/eve-api#146 to add three optional GPT-identity fields to ZInfoStorage (partitionLabel, partitionTypeGuid, partitionUuid) for per-partition entries in ZInfoDevice.storageList, and catches up remaining eve-api changes since the prior bump. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pulls in lf-edge/eve-api#146 to add three optional GPT-identity fields to ZInfoStorage (partitionLabel, partitionTypeGuid, partitionUuid) for per-partition entries in ZInfoDevice.storageList, and catches up remaining eve-api changes since the prior bump. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pulls in lf-edge/eve-api#146 to add three optional GPT-identity fields to ZInfoStorage (partitionLabel, partitionTypeGuid, partitionUuid) for per-partition entries in ZInfoDevice.storageList, and catches up remaining eve-api changes since the prior bump. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pulls in lf-edge/eve-api#146 to add three optional GPT-identity fields to ZInfoStorage (partitionLabel, partitionTypeGuid, partitionUuid) for per-partition entries in ZInfoDevice.storageList, and catches up remaining eve-api changes since the prior bump. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Extend
ZInfoStorage(the per-partition entry inZInfoDevice.storageList) with three optional fields so a controllercan identify each entry by its GPT role rather than only by raw device
name:
partitionLabel(5) — GPT PARTLABEL, e.g.EFI System,CONFIG,IMGA,IMGB,P3.partitionTypeGuid(6) — GPT partition-type GUID.partitionUuid(7) — GPT PARTUUID — the same identifier EVE's bootpath uses to resolve
IMGA/IMGB/CONFIG.Motivation
EVE already enumerates every block partition
lsblksees and reportseach one's size in
ZInfoStorage.total. But a controller seeing/dev/sda1,/dev/sda2,/dev/sda3with sizes cannot tell which isthe EFI partition, which is
IMGAvsIMGB, or compare the size ofeither against the rootfs being staged. With these three fields it
can.
Compatibility
Pure additive change. New fields are appended as 5/6/7; existing
clients keep parsing the message unchanged. EVE fills the fields only
for block-partition entries on GPT-partitioned disks; directory
entries and partitions on non-GPT disks emit empty strings.
Follow-up
EVE pillar needs a follow-up change to populate the new fields from
lsblk -o PARTLABEL,PARTTYPE,PARTUUID(or equivalent). That changeis not in this PR.