From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V05vH-0008DS-Ft for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:20:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V05vF-0001SF-Nj for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:20:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V05vF-0001S5-GY for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:20:17 -0400 Date: Fri, 19 Jul 2013 10:20:10 +0200 From: Kevin Wolf Message-ID: <20130719082010.GB2992@dhcp-200-207.str.redhat.com> References: <1374069835-14287-1-git-send-email-xiawenc@linux.vnet.ibm.com> <51E6A8D3.4050406@redhat.com> <51E8DCC4.3080508@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <51E8DCC4.3080508@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, stefanha@redhat.com, dietmar@proxmox.com Am 19.07.2013 um 08:29 hat Wenchao Xia geschrieben: > =E4=BA=8E 2013-7-17 22:23, Eric Blake =E5=86=99=E9=81=93: > >On 07/17/2013 08:03 AM, 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. > >> > >>This brings two interesting issues: > >>1 is it safe to let qemu-nbd and qemu access that file at same time? > > > >Probably not, for the same reason we tell people to not use qemu-img > >while qemu is active on a file. > > > For external case, or backing chain, qemu-nbd export while qemu is > active, do you think it is OK? >=20 > base->imageA >=20 > qemu-nbd export base > qemu use imageA. It depends. If you use 'qemu-nbd -r' to export it, it's okay. The reason is that it's allowed to have either one process opening the file read-write, or an arbitrary number of processes opening the file read-only. In the case of qemu using imageA, base is only opened read-only, so qemu-nbd can be another read-only user. Kevin