From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsFnh-0004O0-H5 for qemu-devel@nongnu.org; Mon, 07 Jan 2013 11:43:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsFng-0008AK-GL for qemu-devel@nongnu.org; Mon, 07 Jan 2013 11:43:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsFng-0008AE-8u for qemu-devel@nongnu.org; Mon, 07 Jan 2013 11:43:48 -0500 Message-ID: <50EAFB3C.5050305@redhat.com> Date: Mon, 07 Jan 2013 17:43:40 +0100 From: Kevin Wolf 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> In-Reply-To: <1355725509-5429-2-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 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: Wenchao Xia Cc: blauwirbel@gmail.com, pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@gmail.com Am 17.12.2012 07:25, schrieb Wenchao Xia: > This patch moves bdrv_snapshotfind from savevm.c to block.c and export > it, also added bdrv_deappend in block.c. > > Signed-off-by: Wenchao Xia Should be two separate patches. > --- > block.c | 30 ++++++++++++++++++++++++++++++ > block.h | 3 +++ > savevm.c | 22 ---------------------- > 3 files changed, 33 insertions(+), 22 deletions(-) > > diff --git a/block.c b/block.c > index 0668c4b..61c7c6a 100644 > --- a/block.c > +++ b/block.c > @@ -1376,6 +1376,13 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top) > bs_new->drv ? bs_new->drv->format_name : ""); > } > > +/* revert the action */ > +void bdrv_deappend(BlockDriverState *bs_new, BlockDriverState *bs_top) > +{ > + bdrv_swap(bs_new, bs_top); > + /* this is enough? */ > +} What will this be used for? Maybe it's better to introduce a function simple as this only when it's actually used. Kevin