qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown com


From: Hailiang Zhang
Subject: Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown command for VM in COLO state
Date: Wed, 27 Jan 2016 17:54:55 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 2016/1/27 3:55, Dr. David Alan Gilbert wrote:
* zhanghailiang (address@hidden) wrote:
If VM is in COLO FT state, we should do some extra work before normal shutdown
process. SVM will ignore the shutdown command if this command is issued directly
to it, PVM will send the shutdown command to SVM if it gets this command.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
---
v13:
- Move COLO shutdown related codes to colo.c file (Dave's suggestion)

diff --git a/migration/colo.c b/migration/colo.c
index de01ade..2bea519 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -248,6 +248,7 @@ static uint64_t colo_get_cmd_value(QEMUFile *f, uint32_t 
expect_cmd,
  static int colo_do_checkpoint_transaction(MigrationState *s,
                                            QEMUSizedBuffer *buffer)
  {
+    int colo_shutdown;
      QEMUFile *trans = NULL;
      size_t size;
      Error *local_err = NULL;
@@ -277,6 +278,7 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
          qemu_mutex_unlock_iothread();
          goto out;
      }
+    colo_shutdown = colo_shutdown_requested;
      vm_stop_force_state(RUN_STATE_COLO);
      qemu_mutex_unlock_iothread();
      trace_colo_vm_state_change("run", "stop");
@@ -330,6 +332,18 @@ static int colo_do_checkpoint_transaction(MigrationState 
*s,
          goto out;
      }

+    if (colo_shutdown) {

Why do you take a copy of colo_shutdown_requested rather than just use
it directly?


Hmm, it is unnecessary, i will fix it in next version, thanks.

Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK

.






reply via email to

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