From 916ccaa25cf401f8cb3a7835a22073eb4556edbe Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Tue, 9 Jun 2026 18:35:42 +0200 Subject: [PATCH] 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 f1f724b..cad2d1b 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -582,6 +582,7 @@ message WorkloadStatus { WorkloadMountStatus mount_status = 5; google.protobuf.Timestamp created_at = 6; WorkloadPciDeviceStatus pci_device_status = 7; + WorkloadDeviceStatus device_status = 8; } message WorkloadBlockDeviceInfo { @@ -592,6 +593,10 @@ message WorkloadBlockDeviceInfo { bool loop_dev = 5; } +message WorkloadFsDeviceInfo { + uint64 device_id = 1; +} + message WorkloadPciDeviceInfo { string location = 1; } @@ -604,6 +609,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;