[libvirt] [PATCH 0/5] Remove some volOptions from virStoragePoolTypeInfo

While working through changes to add storage pool capabilities I found that the volOptions definitions for a few pool types were not necessary and in a couple of cases wrong. Figured I would extract them out of my work on those adjustments while I'm still working through the code. John Ferlan (5): conf: Remove volOptions for VIR_STORAGE_POOL_SHEEPDOG conf: Remove volOptions for VIR_STORAGE_POOL_RBD conf: Remove volOptions for VIR_STORAGE_POOL_SCSI conf: Remove volOptions for VIR_STORAGE_POOL_ISCSI[_DIRECT] conf: Remove volOptions for VIR_STORAGE_POOL_MPATH src/conf/storage_conf.c | 21 --------------------- tests/storagevolxml2xmlout/vol-sheepdog.xml | 1 - 2 files changed, 22 deletions(-) -- 2.20.1

The sheepdog pool is documented as not using the volume type, so let's just remove it. Besides it would have produced bad results since the defaultType is FILE but the formatting used the Disk types. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/storage_conf.c | 4 ---- tests/storagevolxml2xmlout/vol-sheepdog.xml | 1 - 2 files changed, 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 1ee31ca676..ac7cc77e82 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -249,10 +249,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { VIR_STORAGE_POOL_SOURCE_NETWORK | VIR_STORAGE_POOL_SOURCE_NAME), }, - .volOptions = { - .defaultFormat = VIR_STORAGE_FILE_RAW, - .formatToString = virStoragePoolFormatDiskTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_GLUSTER, .poolOptions = { diff --git a/tests/storagevolxml2xmlout/vol-sheepdog.xml b/tests/storagevolxml2xmlout/vol-sheepdog.xml index e1d6a9e27d..d6e920bb81 100644 --- a/tests/storagevolxml2xmlout/vol-sheepdog.xml +++ b/tests/storagevolxml2xmlout/vol-sheepdog.xml @@ -6,6 +6,5 @@ <allocation unit='bytes'>0</allocation> <target> <path>sheepdog:test2</path> - <format type='unknown'/> </target> </volume> -- 2.20.1

The rbd pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/storage_conf.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index ac7cc77e82..8e87e79019 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -237,11 +237,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { VIR_STORAGE_POOL_SOURCE_NETWORK | VIR_STORAGE_POOL_SOURCE_NAME), }, - .volOptions = { - .defaultFormat = VIR_STORAGE_FILE_RAW, - .formatFromString = virStorageVolumeFormatFromString, - .formatToString = virStorageFileFormatTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_SHEEPDOG, .poolOptions = { -- 2.20.1

The scsi pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/storage_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 8e87e79019..085501b118 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -227,9 +227,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { .poolOptions = { .flags = (VIR_STORAGE_POOL_SOURCE_ADAPTER), }, - .volOptions = { - .formatToString = virStoragePoolFormatDiskTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_RBD, .poolOptions = { -- 2.20.1

The iscsi and iscsi-direct pools are documented as not using the volume type, so let's just remove it. Besides it would have produced bad output since formatting uses the Disk types. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/storage_conf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 085501b118..264e5827b0 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -208,9 +208,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { VIR_STORAGE_POOL_SOURCE_DEVICE | VIR_STORAGE_POOL_SOURCE_INITIATOR_IQN), }, - .volOptions = { - .formatToString = virStoragePoolFormatDiskTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_ISCSI_DIRECT, .poolOptions = { @@ -219,9 +216,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { VIR_STORAGE_POOL_SOURCE_NETWORK | VIR_STORAGE_POOL_SOURCE_INITIATOR_IQN), }, - .volOptions = { - .formatToString = virStoragePoolFormatDiskTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_SCSI, .poolOptions = { -- 2.20.1

The multipath pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/storage_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 264e5827b0..e9c943d25c 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -250,9 +250,6 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { } }, {.poolType = VIR_STORAGE_POOL_MPATH, - .volOptions = { - .formatToString = virStoragePoolFormatDiskTypeToString, - } }, {.poolType = VIR_STORAGE_POOL_DISK, .poolOptions = { -- 2.20.1

On 2/7/19 8:53 AM, John Ferlan wrote:
While working through changes to add storage pool capabilities I found that the volOptions definitions for a few pool types were not necessary and in a couple of cases wrong. Figured I would extract them out of my work on those adjustments while I'm still working through the code.
John Ferlan (5): conf: Remove volOptions for VIR_STORAGE_POOL_SHEEPDOG conf: Remove volOptions for VIR_STORAGE_POOL_RBD conf: Remove volOptions for VIR_STORAGE_POOL_SCSI conf: Remove volOptions for VIR_STORAGE_POOL_ISCSI[_DIRECT] conf: Remove volOptions for VIR_STORAGE_POOL_MPATH
src/conf/storage_conf.c | 21 --------------------- tests/storagevolxml2xmlout/vol-sheepdog.xml | 1 - 2 files changed, 22 deletions(-)
NB: The full series is now posted and these patches are there, so go see the full series instead: https://www.redhat.com/archives/libvir-list/2019-February/msg00709.html Tks - John
participants (1)
-
John Ferlan