Received: from eggs.gnu.org ([2001:4830:134:3::10]:59641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1ABy-0002QO-33 for qemu-devel@nongnu.org; Mon, 22 Jul 2013 03:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1ABr-00069O-AH for qemu-devel@nongnu.org; Mon, 22 Jul 2013 03:05:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1ABq-000694-Vt for qemu-devel@nongnu.org; Mon, 22 Jul 2013 03:05:51 -0400 Date: Mon, 22 Jul 2013 15:05:24 +0800 From: Fam Zheng Message-ID: <20130722070524.GB1992@T430s.redhat.com> References: <1374464794-13057-1-git-send-email-famz@redhat.com> <51ECD49A.5050104@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <51ECD49A.5050104@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/2] block: allow commit active as top Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, 07/22 14:43, Wenchao Xia wrote: > =E4=BA=8E 2013-7-22 11:46, Fam Zheng =E5=86=99=E9=81=93: > > Previously live commit of active block device is not supported, this = series > > implements it and updates corresponding qemu-iotests cases. > >=20 > > Please see commit messages for implementation details. > >=20 > > Fam Zheng (2): > > block: allow live commit of active image > > qemu-iotests: update test cases for commit active > >=20 > > block.c | 102 ++++++++++--------------------- > > block/commit.c | 160 +++++++++++++++++++++++++-------------= ----------- > > include/block/block.h | 5 +- > > tests/qemu-iotests/040 | 68 ++++++++------------- > > 4 files changed, 141 insertions(+), 194 deletions(-) > >=20 > I have thought the commit with top issue before, a question comes to > me: what is the relationship with block-stream? >=20 > for example: > base->mid->top >=20 > you can block-stream mid to top(if I remember correctly), result is: > base->(mid+top) >=20 > with this patch, you can block-commit top to mid, result is: > base->(mod+top) >=20 > it seems the function is duplicated. Maybe you can raise another > good user case. I must say it may help user to do every thing > with block-commit, but if you find it is too much to make it work, > maybe you can postpond it, since block-stream is available. >=20 Of course, you can either merge 'top' into 'mid', or merge 'mid' into 'top', you always get sum of them. However if 'mid' is very large while you only allocated a few clusters in 'top', block-stream is not very nice to use: you need to copy the whole 'mid' to 'top'. But committing 'top' back to 'mid', if it has no other children, will be much faster. --=20 Fam