From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55636 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvuV9-0004SE-3j for qemu-devel@nongnu.org; Wed, 15 Sep 2010 12:06:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvuV6-0004IE-Hw for qemu-devel@nongnu.org; Wed, 15 Sep 2010 12:06:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4395) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvuV6-0004I4-Bq for qemu-devel@nongnu.org; Wed, 15 Sep 2010 12:06:24 -0400 From: Juan Quintela In-Reply-To: <4C8DDF18.5030703@redhat.com> (Kevin Wolf's message of "Mon, 13 Sep 2010 10:21:44 +0200") References: <1284213896-12705-1-git-send-email-aliguori@us.ibm.com> <1284213896-12705-2-git-send-email-aliguori@us.ibm.com> <4C8DDF18.5030703@redhat.com> Date: Wed, 15 Sep 2010 18:03:48 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 1/3] block: allow migration to work with image files List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi Kevin Wolf wrote: > Am 11.09.2010 16:04, schrieb Anthony Liguori: > There is a simple generic implementation: > > drv = bs->drv; > drv->close(bs); > drv->open(bs, bs->open_flags); > > Note that this only reopens e.g. the qcow2 layer, but not the image > file, which is bs->file. > > This works for all simple case, that is, one format on top of one or > more protocols, where the protocols don't need invalidation. I think > this includes everything that is possible today. With -blockdev we might > need to revise this to include the lower layers, too. (But only > sometimes, because we don't want to reopen the file) we require it for nfs consistency. We need to: source: fsync() target: open() (after the fsync). About your 1st comment, I am doing: bdrv_close(bdrv); bdrv_open(bdrv); Do you mean that this don't close and open again the file with qcow2? Later, Juan.