From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1cBa-0006YR-IQ for qemu-devel@nongnu.org; Mon, 30 Jun 2014 10:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1cBS-00006i-5E for qemu-devel@nongnu.org; Mon, 30 Jun 2014 10:03:58 -0400 Received: from vs-w.tc.umn.edu ([134.84.135.88]:57661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1cBR-0008Uk-N5 for qemu-devel@nongnu.org; Mon, 30 Jun 2014 10:03:50 -0400 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by vs-w.tc.umn.edu (UMN smtpd) with ESMTP for ; Mon, 30 Jun 2014 09:03:30 -0500 (CDT) Received: by mail-wg0-f45.google.com with SMTP id l18so8027072wgh.28 for ; Mon, 30 Jun 2014 07:03:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53B14064.8010600@redhat.com> References: <53ADE6F8.1070303@redhat.com> <53B14064.8010600@redhat.com> Date: Mon, 30 Jun 2014 10:03:28 -0400 Message-ID: From: Xiongzi Ge Content-Type: multipart/alternative; boundary=047d7b3a88fc98912d04fd0e1f9d Subject: Re: [Qemu-devel] The first function called after migration for a block device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org --047d7b3a88fc98912d04fd0e1f9d Content-Type: text/plain; charset=UTF-8 I tried. It invalidated the cache of the block device after migration. So, here, we can use a new cache for the block device after migration. Is it right? I can implement a simple block driver in block/ directory. On Mon, Jun 30, 2014 at 6:48 AM, Paolo Bonzini wrote: > Il 28/06/2014 00: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: > > This function 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. >>> >> > Did you even *try* to understand this?!? > > Paolo > > --047d7b3a88fc98912d04fd0e1f9d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I tried. It invalidated the cache of the block device afte= r migration. So, here, we can use a new cache for the block device after mi= gration. Is it right?=C2=A0 I can implement a simple block driver in block/= directory.


On Mon,= Jun 30, 2014 at 6:48 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
Il 28/06/2014 00:54, Xiongzi Ge ha scritto:<= div class=3D"">
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:

=C2=A0 =C2=A0 This function has *nothing* to do with the guest OS's
=C2=A0 =C2=A0 cache. =C2=A0That cache is managed by the guest OS and, as I = have already
=C2=A0 =C2=A0 told you multiple times, there is *nothing* that QEMU can do = about it.

=C2=A0 =C2=A0 All you can do is use O_DIRECT in the guest.

Did you even *try* to understand this?!?

Paolo


--047d7b3a88fc98912d04fd0e1f9d--