On 05/06/2016 10:08 AM, Max Reitz wrote: > On 05.05.2016 05:42, Eric Blake wrote: >> When opening a file from the command line, qemu-io defaults >> to BDRV_O_UNMAP but allows -d to give full control to disable >> unmaps. But when opening via the 'open' command, qemu-io did >> not set BDRV_O_UNMAP, and had no way to allow it. >> >> Make it at least possible to symmetrically test things: >> 'qemu-io -d ignore' at the CLI now matches 'qemu-io> open' >> in batch mode, and 'qemu-io' or 'qemu-io -d unmap' at >> the CLI matches 'qemu-io> open -u'. >> >> Signed-off-by: Eric Blake >> --- >> qemu-io.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) > > Not sure why you didn't just reuse the -d option for qemu-io itself, but: -d=string is different than -u (as a binary flag). But you have a point, that being able to fully-specify ALL modes, rather than just turning on a single mode, is more flexible. I'll see how tough it is to fix for v5. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org