Re: [Qemu-devel] The first function called after migration for a block device

2014-06-30 Thread Xiongzi Ge
Sorry for that. I planed to use the existing method in qemu to add some new mechanism after migration. Does qemu have a IPC channel to communicate during migration? On Mon, Jun 30, 2014 at 11:13 AM, Paolo Bonzini wrote: > Il 30/06/2014 16:47, Xiongzi Ge ha scritto: > > Hi, >&

Re: [Qemu-devel] The first function called after migration for a block device

2014-06-30 Thread Xiongzi Ge
which has a cache created by myself. I can modify and control the cache after migration. Do you have any suggestions? Thanks. ) On Mon, Jun 30, 2014 at 10:35 AM, Paolo Bonzini wrote: > Il 30/06/2014 16:03, Xiongzi Ge ha scritto: > > I tried. It invalidated the cache of the block dev

Re: [Qemu-devel] The first function called after migration for a block device

2014-06-30 Thread Xiongzi Ge
:54, Xiongzi Ge ha scritto: > > Hi Paolo, >> >> Thanks. I found a function called bdrv_invalidate_cache() in qcow2.c. >> After migration, it will be called to invalidate the cache of the block >> device? >> > > Let me quote again: > > Th

Re: [Qemu-devel] The first function called after migration for a block device

2014-06-27 Thread Xiongzi Ge
Hi Paolo, Thanks. I found a function called bdrv_invalidate_cache() in qcow2.c. After migration, it will be called to invalidate the cache of the block device? On Fri, Jun 27, 2014 at 5:49 PM, Paolo Bonzini wrote: > Il 27/06/2014 21:41, Xiongzi Ge ha scritto: > > >> When I stud

[Qemu-devel] The first function called after migration for a block device

2014-06-27 Thread Xiongzi Ge
Hello, When I studied the code, I found in migration.c, bdrv_clear_incoming_migration_all(); the cache of the bdrv devices will be deleted. Is this the one for the functions to be called after migration? Does the bdrv device need to be reopen or load state in block.c? I would like to find this

Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Xiongzi Ge
access the previous cache device in Host A, if it gets a miss. Here, I may need to modify some interfaces. Is there a simple way to do this? Thanks a lot On Wed, Jun 25, 2014 at 10:18 AM, Paolo Bonzini wrote: > Il 25/06/2014 16:14, Xiongzi Ge ha scritto: > > Is there a good way to h

Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Xiongzi Ge
Is there a good way to handle the memory in the guest via qemu? On Wed, Jun 25, 2014 at 2:18 AM, Paolo Bonzini wrote: > Il 25/06/2014 02:08, Xiongzi Ge ha scritto: > > Will the cache data in the guest be migrated to the other host? >> > > Again, cache data is _not_ ma

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
st re-open the block device and delete the previous cache data or just check the consistency of the cache and the block device? Thanks. On Tue, Jun 24, 2014 at 7:16 PM, Eric Blake wrote: > On 06/24/2014 03:29 PM, Brian Jackson wrote: > > > > > > On 6/2

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
, this cache should recognize that the cache content storing in the disk has been changed. DOes anyone has good suggestions? Thanks ! On Tue, Jun 24, 2014 at 4:41 PM, Eric Blake wrote: > On 06/24/2014 01:55 PM, Xiongzi Ge wrote: > > Hi Paolo, > > > > I am trying to

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Il 24/06/2014 21:55, Xiongzi Ge ha scritto: > > Hi Paolo, >> >> I am trying to do migration with two different block devices in the >> source and destination hosts. For example, in the source the data in >> /dev/vda are 'a'. The guest has a cache. T

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi Paolo, I am trying to do migration with two different block devices in the source and destination hosts. For example, in the source the data in /dev/vda are 'a'. The guest has a cache. These data are cached. In the other host, the data in this device are 'b'. If we do migration, I

[Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different data from the same /dev/vda device. I am stu

[Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different data from the same /dev/vda device. I am stu