From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9gSS-0001Jt-0Z for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:14:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9gSJ-0000Qf-Va for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:14:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9gSJ-0000Qa-ND for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:14:35 -0400 Message-ID: <53CEC642.6020804@redhat.com> Date: Tue, 22 Jul 2014 22:14:58 +0200 From: Max Reitz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/5] block: vdi - use block layer ops in vdi_create, instead of posix calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, sw@weilnetz.de, stefanha@redhat.com On 21.07.2014 21:52, Jeff Cody wrote: > Use the block layer to create, and write to, the image file in the > VDI .bdrv_create() operation. > > This has a couple of benefits: Images can now be created over protocols, > and hacks such as NOCOW are not needed in the image format driver, and > the underlying file protocol appropriate for the host OS can be relied This sounds a bit strange to me, but I don't know if it's wrong. > upon. > > Also some minor cleanup for error handling. > > Signed-off-by: Jeff Cody > --- > block/vdi.c | 68 ++++++++++++++++++++++++++----------------------------------- > 1 file changed, 29 insertions(+), 39 deletions(-) > > diff --git a/block/vdi.c b/block/vdi.c > index 197bd77..5fd9d5f 100644 > --- a/block/vdi.c > +++ b/block/vdi.c > @@ -681,7 +681,6 @@ static int vdi_co_write(BlockDriverState *bs, > Anyway: Reviewed-by: Max Reitz