From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrP5K-0000V6-6o for qemu-devel@nongnu.org; Sat, 05 Jan 2013 03:26:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrP5F-0002f6-Ot for qemu-devel@nongnu.org; Sat, 05 Jan 2013 03:26:30 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:45074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrP5F-0002ef-5r for qemu-devel@nongnu.org; Sat, 05 Jan 2013 03:26:25 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 5 Jan 2013 18:23:18 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 39E072BB004A for ; Sat, 5 Jan 2013 19:26:05 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r058Q4p966322638 for ; Sat, 5 Jan 2013 19:26:04 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r058Q4ac017322 for ; Sat, 5 Jan 2013 19:26:05 +1100 Message-ID: <50E7E39B.8010603@linux.vnet.ibm.com> Date: Sat, 05 Jan 2013 16:26:03 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1355725509-5429-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1355725509-5429-2-git-send-email-xiawenc@linux.vnet.ibm.com> <20130104144915.GA6310@stefanha-thinkpad.hitronhub.home> In-Reply-To: <20130104144915.GA6310@stefanha-thinkpad.hitronhub.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] snapshot: export function in block.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, blauwirbel@gmail.com Thanks for reviewing carefully, this patch would be split to two patches. > On Mon, Dec 17, 2012 at 02:25:04PM +0800, Wenchao Xia wrote: >> This patch moves bdrv_snapshotfind from savevm.c to block.c and export >> it, also added bdrv_deappend in block.c. > > I suggest naming the patch "block: export bdrv_snapshot_find()" because > it is more specific than "snapshot: export function in block.c". > >> +/* revert the action */ >> +void bdrv_deappend(BlockDriverState *bs_new, BlockDriverState *bs_top) >> +{ >> + bdrv_swap(bs_new, bs_top); >> + /* this is enough? */ >> +} > > Please document this function in the same level of detail as > bdrv_append(). These functions are tricky and you must explain the > semantics so anyone else reading the code can safely use or modify this > function. > > We also need to resolve the "this is enough?" comment. I'll think it > through when I see how bdrv_deappend() is used later. > > Stefan > -- Best Regards Wenchao Xia