Re: [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-22 Thread Stefan Hajnoczi
On Fri, Aug 19, 2016 at 09:06:08PM +0200, Reda Sallahi wrote: > On Tue, Aug 16, 2016 at 12:09:06PM +0100, Stefan Hajnoczi wrote: > > On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > > > +blk2 = blk_new_open(image_opts ? NULL : out.filename, > > > +NULL, qo

Re: [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-19 Thread Reda Sallahi
On Tue, Aug 16, 2016 at 12:09:06PM +0100, Stefan Hajnoczi wrote: > On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > > +blk2 = blk_new_open(image_opts ? NULL : out.filename, > > +NULL, qoptions, BDRV_O_RDWR, NULL); > > This code duplicates a subset of img_

Re: [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-16 Thread Stefan Hajnoczi
On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > dd was creating an output image regardless of whether there was one already > created. With this patch we try to open first the output image and resize it > if necessary. > > We also make it mandatory to specify conv=notrunc when the

[Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-15 Thread Reda Sallahi
dd was creating an output image regardless of whether there was one already created. With this patch we try to open first the output image and resize it if necessary. We also make it mandatory to specify conv=notrunc when the file already exists. Signed-off-by: Reda Sallahi --- Depends on: [PATC