From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr1Rv-0000MS-FS for qemu-devel@nongnu.org; Thu, 12 Dec 2013 03:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr1Rp-0000CQ-Fv for qemu-devel@nongnu.org; Thu, 12 Dec 2013 03:16:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr1Rp-0000CL-7r for qemu-devel@nongnu.org; Thu, 12 Dec 2013 03:16:41 -0500 Message-ID: <52A970D8.6050206@redhat.com> Date: Thu, 12 Dec 2013 16:16:24 +0800 From: Fam Zheng MIME-Version: 1.0 References: <1385627982-14675-1-git-send-email-famz@redhat.com> <52A7D219.1070703@redhat.com> <871u1imqox.fsf@blackfin.pond.sub.org> In-Reply-To: <871u1imqox.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 00/10] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org, imain@redhat.com, stefanha@redhat.com, pbonzini@redhat.com On 2013=E5=B9=B412=E6=9C=8812=E6=97=A5 16:14, Markus Armbruster wrote: > Fam Zheng writes: > >> On 2013=E5=B9=B411=E6=9C=8828=E6=97=A5 16:39, Fam Zheng wrote: >>> This series adds for point-in-time snapshot NBD exporting based on >>> blockdev-backup (variant of drive-backup with existing device as targ= et). >>> >>> We get a thin point-in-time snapshot by COW mechanism of drive-backup= , and >>> export it through built in NBD server. The steps are as below: >>> >>> 1. (SHELL) qemu-img create -f qcow2 BACKUP.qcow2 >>> >>> (Alternatively we can use -o backing_file=3DRUNNING-VM.img to o= mit explicitly >>> providing the size by ourselves, but it's risky because RUNNING= -VM.qcow2 is >>> used r/w by guest. Whether or not setting backing file in the i= mage file >>> doesn't matter, as we are going to override the backing hd in t= he next >>> step) >>> >>> 2. (QMP) blockdev-add backing=3Dsource-drive file.driver=3Dfile fi= le.filename=3DBACKUP.qcow2 id=3Dtarget0 if=3Dnone driver=3Dqcow2 >>> >>> (where ide0-hd0 is the running BlockDriverState name for >>> RUNNING-VM.img. This patch implements "backing=3D" option to ov= erride >>> backing_hd for added drive) > > Are source-drive and ide0-hd0 the same thing? > Yes, typo. Sorry for that. >>> >>> 3. (QMP) blockdev-backup device=3Dsource-drive sync=3Dnone target=3D= target0 >>> >>> (this is the QMP command introduced by this series, which use a= named >>> device as target of drive-backup) >>> >>> 4. (QMP) nbd-server-add device=3Dtarget0 >>> >>> When image fleecing done: >>> >>> 1. (QMP) block-job-complete device=3Dide0-hd0 >>> >>> 2. (HMP) drive_del target0 >>> >>> 3. (SHELL) rm BACKUP.qcow2 >>> >>> v6: Address Paolo's comments, (except for bitmask): >>> - Add blocker for all backing_hd references, a relatively big c= hange, some >>> patches are reordered. >>> - Introduce a few other necessary patches. >>> - Move two snapshot checks into bdrv_snapshot_*. >>> >>> The interface is unchanged. >>> >> >> Hi, >> >> Based on the size of change, this series needs some more review before >> merging. And I'd like to know if there is any concern or objection >> with op_blocker introduced here. I would like to base my next series >> (incremental backup with dirty bitmap) on it. >> >> Any more reviews/comments? > > I started looking over it. First observation: needs a rebase :-} > I'll do it now. Fam