qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/5] block: vdi - use block layer ops in vdi_


From: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH v2 2/5] block: vdi - use block layer ops in vdi_create, instead of posix calls
Date: Tue, 22 Jul 2014 16:19:24 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jul 22, 2014 at 10:14:58PM +0200, Max Reitz wrote:
> 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.
>

You find the wording strange, or the logic itself?  If the latter, the
use of the posix calls (open(), write()) means that we cannot create
images over protocols such as gluster - so using the qemu block layer
operations instead means protocols are now supported.  And NOCOW is
not needed in the image format driver now, since raw-posix does the
same thing (if the bs->file protocol driver is a host file on a posix
system).

> >upon.
> >
> >Also some minor cleanup for error handling.
> >
> >Signed-off-by: Jeff Cody <address@hidden>
> >---
> >  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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]