Add missing ABI stability check for blockio properties for disk devices. Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> --- src/conf/domain_conf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2e60927799..71bd49bf95 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19775,6 +19775,28 @@ virDomainVirtioOptionsCheckABIStability(virDomainVirtioOptions *src, } +static bool +virDomainDiskBlockIoCheckABIStability(virDomainDiskDef *src, + virDomainDiskDef *dst) +{ + if (src->blockio.logical_block_size != dst->blockio.logical_block_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target disk logical_block_size %1$u does not match source %2$u"), + dst->blockio.logical_block_size, src->blockio.logical_block_size); + return false; + } + + if (src->blockio.physical_block_size != dst->blockio.physical_block_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target disk physical_block_size %1$u does not match source %2$u"), + dst->blockio.physical_block_size, src->blockio.physical_block_size); + return false; + } + return true; +} + + + static bool virDomainDiskDefCheckABIStability(virDomainDiskDef *src, virDomainDiskDef *dst) @@ -19858,6 +19880,9 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef *src, if (!virDomainDeviceInfoCheckABIStability(&src->info, &dst->info)) return false; + if (!virDomainDiskBlockIoCheckABIStability(src, dst)) + return false; + return true; } -- 2.41.0