qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo check


From: Hailiang Zhang
Subject: Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo checkpoint protocol
Date: Thu, 26 Nov 2015 14:52:59 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 2015/11/25 22:01, Eric Blake wrote:
On 11/24/2015 12:00 PM, Dr. David Alan Gilbert wrote:
* zhanghailiang (address@hidden) wrote:
We need communications protocol of user-defined to control the checkpoint
process.


+static int colo_ctl_get(QEMUFile *f, uint32_t require, uint64_t *value)
+{
+    int ret;
+    uint32_t cmd;
+
+    ret = colo_ctl_get_cmd(f, &cmd);
+    if (ret < 0) {
+        return ret;
+    }
+    if (cmd != require) {
+        error_report("Unexpect colo command, expect:%d, but got cmd:%d",
+                     require, cmd);

I think you need to use PRIu32 rather than %d  since they are uint32_t
(I doubt it will break on anything, but it's correct).

32-bit cygwin uses 'long' for uint32_t, so there ARE platforms where it
is absolutely necessary to use PRIu32 for printing (even if qemu isn't
ported to cygwin).


Got it, i will fix it.


+++ b/qapi-schema.json
@@ -722,6 +722,33 @@
  { 'command': 'migrate-start-postcopy' }

  ##
+# @COLOCommand
+#
+# The commands for COLO fault tolerance
+#
+# @invalid: unknown command
+#
+# @checkpoint-ready: SVM is ready for checkpointing
+#
+# @checkpoint-request: PVM tells SVM to prepare for new checkpointing
+#
+# @checkpoint-reply: SVM gets PVM's checkpoint request
+#
+# @vmstate-send: VM's state will be sent by PVM.
+#
+# @vmstate-size: The total size of VMstate.
+#
+# @vmstate-received: VM's state has been received by SVM
+#
+# @vmstate-loaded: VM's state has been loaded by SVM

Inconsistent use of trailing '.'

Also, do we really need 'invalid'?


No, we can remove it. Thanks.

+#
+# Since: 2.6
+##
+{ 'enum': 'COLOCommand',
+  'data': [ 'invalid', 'checkpoint-ready', 'checkpoint-request',
+            'checkpoint-reply', 'vmstate-send', 'vmstate-size',
+            'vmstate-received', 'vmstate-loaded' ] }
+







reply via email to

[Prev in Thread] Current Thread [Next in Thread]