From 23b0d6a0ff9d9d3eb0f1ba32c1262acf66122470 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 20 Jan 2022 11:43:22 +0100 Subject: [PATCH] virStoragePoolObjSourceFindDuplicateCb: Fix handling of VIR_STORAGE_POOL_ISCSI_DIRECT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The direct SCSI pool doesn't expose the volumes in the host attempting to match it using 'virStoragePoolObjSourceMatchTypeDEVICE' which in turn uses 'virStoragePoolSourceFindDuplicateDevices' doesn't make sense. Remove it from the source matching completely as we can open multiple connections to the target. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/conf/virstorageobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 4081e12823..58c86e8b1b 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1447,13 +1447,11 @@ virStoragePoolObjSourceFindDuplicateCb(const void *payload, break; case VIR_STORAGE_POOL_ISCSI: - case VIR_STORAGE_POOL_ISCSI_DIRECT: case VIR_STORAGE_POOL_FS: case VIR_STORAGE_POOL_LOGICAL: case VIR_STORAGE_POOL_DISK: case VIR_STORAGE_POOL_ZFS: if ((data->def->type == VIR_STORAGE_POOL_ISCSI || - data->def->type == VIR_STORAGE_POOL_ISCSI_DIRECT || data->def->type == VIR_STORAGE_POOL_FS || data->def->type == VIR_STORAGE_POOL_LOGICAL || data->def->type == VIR_STORAGE_POOL_DISK || @@ -1481,6 +1479,7 @@ virStoragePoolObjSourceFindDuplicateCb(const void *payload, return 1; break; + case VIR_STORAGE_POOL_ISCSI_DIRECT: case VIR_STORAGE_POOL_RBD: case VIR_STORAGE_POOL_LAST: break;