Re: [PATCH v2 04/10] migration: detect compression and decompression errors

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

 





On 03/28/2018 05:59 PM, Peter Xu wrote:
On Tue, Mar 27, 2018 at 05:10:37PM +0800, guangrong.xiao@xxxxxxxxx wrote:

[...]

-static int compress_threads_load_setup(void)
+static int compress_threads_load_setup(QEMUFile *f)
  {
      int i, thread_count;
@@ -2665,6 +2685,7 @@ static int compress_threads_load_setup(void)
          }
          decomp_param[i].stream.opaque = &decomp_param[i];
+ decomp_param[i].file = f;

On the source side the error will be set via:

         qemu_file_set_error(migrate_get_current()->to_dst_file, blen);

Maybe we can do similar things using migrate_incoming_get_current() to
avoid caching the QEMUFile multiple times?


I have considered it, however, it can not work as the @file used by ram
loader is not the file got from migrate_incoming_get_current() under some
cases.

For example, in colo_process_incoming_thread(), the file passed to
qemu_loadvm_state() is a internal buffer and it is not easy to switch it
to incoming file.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux