From c490581d43ba9e9093c29666988d423ab30d06b7 Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Tue, 9 Jun 2026 18:35:42 +0200 Subject: [PATCH 1/2] Add generic devices to WorkloadStatus We are introducing WorkloadDeviceStatus and WorkloadDeviceInfo to define handlers for managing devices in an uniform and generic way. We have been rolling so far with standalone message types for block (WorkloadBlockDeviceInfo message type) and PCI (WorkloadPciDeviceInfo message type) devices and adding support for a new device type (WorkloadFsDeviceInfo message type) raises an immediate need to have a more scalable and generic way of handling devices. Signed-off-by: Costin Lupu --- protect/control/v1/common.proto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index cb6111f..bfb57d0 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -423,6 +423,7 @@ message WorkloadStatus { WorkloadMountStatus mount_status = 5; google.protobuf.Timestamp created_at = 6; WorkloadPciDeviceStatus pci_device_status = 7; + WorkloadDeviceStatus device_status = 8; } message WorkloadBlockDeviceInfo { @@ -433,6 +434,10 @@ message WorkloadBlockDeviceInfo { bool loop_dev = 5; } +message WorkloadFsDeviceInfo { + uint64 device_id = 1; +} + message WorkloadPciDeviceInfo { string location = 1; } @@ -445,6 +450,18 @@ message WorkloadPciDeviceStatus { repeated WorkloadPciDeviceInfo devices = 1; } +message WorkloadDeviceInfo { + oneof info { + WorkloadBlockDeviceInfo block = 1; + WorkloadFsDeviceInfo fs = 2; + WorkloadPciDeviceInfo pci = 3; + } +} + +message WorkloadDeviceStatus { + repeated WorkloadDeviceInfo devices = 1; +} + message WorkloadMountInfo { string tag = 2; string host_path = 3; From 4fe3b34fa73465a3adcb136a3808dd5c3fe37d74 Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Wed, 17 Jun 2026 20:29:17 +0200 Subject: [PATCH 2/2] Introduce mount scope types When sharing host directories, we can either use an unified mount per zone or a mount for each workload. Signed-off-by: Costin Lupu --- protect/control/v1/common.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index bfb57d0..66fa7bb 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -462,11 +462,18 @@ message WorkloadDeviceStatus { repeated WorkloadDeviceInfo devices = 1; } +enum WorkloadMountScopeType { + WORKLOAD_MOUNT_SCOPE_TYPE_UNKNOWN = 0; + WORKLOAD_MOUNT_SCOPE_TYPE_ZONE = 1; + WORKLOAD_MOUNT_SCOPE_TYPE_WORKLOAD = 2; +} + message WorkloadMountInfo { string tag = 2; string host_path = 3; string target_path = 5; bool read_only = 6; + WorkloadMountScopeType scope = 7; reserved 1, 4; }