qemu-devel
[Top][All Lists]
Advanced

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

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


From: Xiongzi Ge
Subject: Re: [Qemu-devel] The first function called after migration for a block device
Date: Fri, 27 Jun 2014 18:54:09 -0400

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 <address@hidden> wrote:
Il 27/06/2014 21:41, Xiongzi Ge ha scritto:


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 function to add my new code.

This function is not going to do anything if your code is in "raw" format.  In particular, it has *nothing* to do with the guest OS's cache.  That cache is managed by the guest OS and, as I have already told you multiple times, there is *nothing* that QEMU can do about it.

All you can do is use O_DIRECT in the guest.

Paolo


reply via email to

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