[PATCH 7/8] virDriverFeatureIsGlobal: Handle VIR_DRV_FEATURE_FD_PASSING

Peter Krempa pkrempa at redhat.com
Wed Feb 16 15:41:11 UTC 2022


The feature implies that fd passing works with RPC. Non-remote impls
thus should always report support.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/driver.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/driver.c b/src/driver.c
index 54b4ad5b43..758ee3e320 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -360,10 +360,14 @@ virDriverFeatureIsGlobal(virDrvFeature feat,
     /* Feature flag exposes that accidental switching of order of arguments
      * in RPC was fixed. All implementations need to advertise this feature */
     case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
+    /* The remote driver intercepts and always reports the feature since it was
+     * introduced. This means that all driver implementations should advertise
+     * it too as it works natively without RPC. Always enabling this will also
+     * prevent regressions when a driver is used in embedded mode */
+    case VIR_DRV_FEATURE_FD_PASSING:
         *supported = 1;
         return true;

-    case VIR_DRV_FEATURE_FD_PASSING:
     case VIR_DRV_FEATURE_MIGRATION_V2:
     case VIR_DRV_FEATURE_MIGRATION_V3:
     case VIR_DRV_FEATURE_MIGRATION_P2P:
-- 
2.35.1




More information about the libvir-list mailing list