Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/26/19 10:26 AM, Kevin Wolf wrote: > >>> Actually, your patch fails to diagnose: >>> >>> $ qemu-img create -o size=1m,size=2m -f qcow2 x.qcow2 >>> Formatting 'x.qcow2', fmt=qcow2 size=2097152 cluster_size=65536 >>> lazy_refcounts=off refcount_bits=16 >>> >>> so you may w

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 10:26 AM, Kevin Wolf wrote: Actually, your patch fails to diagnose: $ qemu-img create -o size=1m,size=2m -f qcow2 x.qcow2 Formatting 'x.qcow2', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16 so you may want to enhance this patch to also catch the case

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Kevin Wolf
Am 26.11.2019 um 16:56 hat Eric Blake geschrieben: > On 11/26/19 9:54 AM, Eric Blake wrote: > > On 11/26/19 9:48 AM, Kevin Wolf wrote: > > > If both the create options (qemu-img create -o ...) and the size > > > parameter were given, the size parameter was silently ignored. Instead, > > > make spec

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 9:54 AM, Eric Blake wrote: On 11/26/19 9:48 AM, Kevin Wolf wrote: If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf ---   block.c

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 9:48 AM, Kevin Wolf wrote: If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf --- block.c| 10 -- tests/

[PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Kevin Wolf
If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf --- block.c| 10 -- tests/qemu-iotests/049 | 5 + tests/qemu