Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-11-01 Thread Daniel P . Berrangé
On Wed, Nov 01, 2023 at 06:03:36PM +0100, Denis V. Lunev wrote: > On 11/1/23 17:51, Daniel P. Berrangé wrote: > > On Tue, Oct 31, 2023 at 03:33:52PM +0100, Hanna Czenczek wrote: > > > On 01.10.23 22:46, Denis V. Lunev wrote: > > > > Can you please not top-post. This makes the discussion complex. Th

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-11-01 Thread Denis V. Lunev
On 11/1/23 17:51, Daniel P. Berrangé wrote: On Tue, Oct 31, 2023 at 03:33:52PM +0100, Hanna Czenczek wrote: On 01.10.23 22:46, Denis V. Lunev wrote: Can you please not top-post. This makes the discussion complex. This approach is followed in this mailing list and in other similar lists like LKM

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-11-01 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 03:33:52PM +0100, Hanna Czenczek wrote: > On 01.10.23 22:46, Denis V. Lunev wrote: > > Can you please not top-post. This makes the discussion complex. This > > approach is followed in this mailing list and in other similar lists > > like LKML. > > > > On 10/1/23 19:08, Mike

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-11-01 Thread Eric Blake
On Tue, Oct 31, 2023 at 03:33:52PM +0100, Hanna Czenczek wrote: > Personally, and honestly, I see no actual use for qemu-img dd at all, > because we’re trying to mimic a subset of an interface of a rather complex > program that has been designed to do what it does. We can only fail at > that.  Pers

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-10-31 Thread Hanna Czenczek
On 01.10.23 22:46, Denis V. Lunev wrote: Can you please not top-post. This makes the discussion complex. This approach is followed in this mailing list and in other similar lists like LKML. On 10/1/23 19:08, Mike Maslenkin wrote: I thought about "conv=notrunc", but my main concern is changed vi

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-10-01 Thread Denis V. Lunev
Can you please not top-post. This makes the discussion complex. This approach is followed in this mailing list and in other similar lists like LKML. On 10/1/23 19:08, Mike Maslenkin wrote: I thought about "conv=notrunc", but my main concern is changed virtual disk metadata. It depends on how qem

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-10-01 Thread Mike Maslenkin
I thought about "conv=notrunc", but my main concern is changed virtual disk metadata. It depends on how qemu-img used. May be I followed to wrong pattern, but pros and cons of adding "conv" parameter was not in my mind in scope of the first patch version. I see 4 obvious ways of using `qemu-img dd`

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-10-01 Thread Denis V. Lunev
On 9/30/23 22:31, Mike Maslenkin wrote: Add a check that destination file exists and do not call bdrv_create for this case. Currently `qemu-img dd` command destroys content of destination file. Effectively this means that parameters (geometry) of destination image file are changing. This can be

[PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-09-30 Thread Mike Maslenkin
Add a check that destination file exists and do not call bdrv_create for this case. Currently `qemu-img dd` command destroys content of destination file. Effectively this means that parameters (geometry) of destination image file are changing. This can be undesirable behavior for user especially i