Received: from eggs.gnu.org ([2001:4830:134:3::10]:58035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06qq-0003oO-05 for qemu-devel@nongnu.org; Fri, 19 Jul 2013 05:19:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V06qo-0004yo-BN for qemu-devel@nongnu.org; Fri, 19 Jul 2013 05:19:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06qo-0004yh-2g for qemu-devel@nongnu.org; Fri, 19 Jul 2013 05:19:46 -0400 Date: Fri, 19 Jul 2013 11:19:41 +0200 From: Kevin Wolf Message-ID: <20130719091941.GE2992@dhcp-200-207.str.redhat.com> References: <1374069835-14287-1-git-send-email-xiawenc@linux.vnet.ibm.com> <20130718054350.GE26971@stefanha-thinkpad.redhat.com> <51E900D3.30705@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <51E900D3.30705@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/4] export internal snapshot by qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, Stefan Hajnoczi , dietmar@proxmox.com Am 19.07.2013 um 11:03 hat Wenchao Xia geschrieben: > =E4=BA=8E 2013-7-18 13:43, Stefan Hajnoczi =E5=86=99=E9=81=93: > >On Wed, Jul 17, 2013 at 10:03:51PM +0800, Wenchao Xia wrote: > >>This series allow user to read internal snapshot's contents without q= emu-img > >>convert. Another purpose is that, when qemu is online and have taken = an > >>internal snapshot, let user invoke qemu-nbd to do any thing on it exc= ept write. > > > >I agree with Eric and Kevin that we cannot access image files while QE= MU > >has them open. > > > >A bit more detail about using the run-time NBD server to do this safel= y: > > > >Internal snapshots are not first-class block layer objects today. The= y > >are not BlockDriverStates, instead you must access their data through > >bdrv_snapshot_goto() or bdrv_snapshot_load_tmp(). > > > Also cc to Fam Zheng an Kevin: > I think BlockDriverStates modification, is based on a more basic > question: does qcow2's data structure on disk, allow multiple snapshot > reader, while one active writer, without lock? I think the modification > showed above, already said "yes" to this question. What exactly do you mean by "without lock"? But yes, there's no fundamental problem in the format specification that would make it impossible to write a driver that accesses multiple snapshots at the same time from the same qemu process. (Even r/w in theory, though we're treating snapshots as immutable traditionally.) Kevin