[libvirt PATCH] conf: add ABI stability check for disk rotation rate

Daniel P. Berrangé posted 1 patch 3 years ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210407134947.389937-1-berrange@redhat.com
src/conf/domain_conf.c | 7 +++++++
1 file changed, 7 insertions(+)
[libvirt PATCH] conf: add ABI stability check for disk rotation rate
Posted by Daniel P. Berrangé 3 years ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/conf/domain_conf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 875edcbff3..83415f9271 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -22313,6 +22313,13 @@ virDomainDiskDefCheckABIStability(virDomainDiskDefPtr src,
         return false;
     }
 
+    if (src->rotation_rate != dst->rotation_rate) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target disk rotation rate %u RPM does not match source %u RPM"),
+                       dst->rotation_rate, src->rotation_rate);
+        return false;
+    }
+
     if (!virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
         return false;
 
-- 
2.30.2

Re: [libvirt PATCH] conf: add ABI stability check for disk rotation rate
Posted by Ján Tomko 3 years ago
On a Wednesday in 2021, Daniel P. Berrangé wrote:
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
> src/conf/domain_conf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano