From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
berrange@redhat.com, qemu-block@nongnu.org
Subject: Re: [PATCH] qemu-img: Add -F shorthand to convert
Date: Sat, 18 Sep 2021 02:36:09 +0300 [thread overview]
Message-ID: <30925a50-0b9b-ea3f-2a7f-f70588e9ba7d@virtuozzo.com> (raw)
In-Reply-To: <20210917201347.aaiwgds6ykyybx75@redhat.com>
17.09.2021 23:13, Eric Blake wrote:
> On Mon, Sep 13, 2021 at 08:17:35AM -0500, Eric Blake wrote:
>> Although we have long supported 'qemu-img convert -o
>> backing_file=foo,backing_fmt=bar', the fact that we have a shortcut -B
>> for backing_file but none for backing_fmt has made it more likely that
>> users accidentally run into:
>>
>> qemu-img: warning: Deprecated use of backing file without explicit backing format
>>
>> when using -B instead of -o. For similarity with other qemu-img
>> commands, such as create and compare, add '-F $fmt' as the shorthand
>> for '-o backing_fmt=$fmt'. Update iotest 122 for coverage of both
>> spellings.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
>>
>
> Self-review (and late, too), but...
>
>> +++ b/docs/tools/qemu-img.rst
>> @@ -414,7 +414,7 @@ Command description:
>> 4
>> Error on reading data
>>
>> -.. option:: convert [--object OBJECTDEF] [--image-opts] [--target-image-opts] [--target-is-zero] [--bitmaps [--skip-broken-bitmaps]] [-U] [-C] [-c] [-p] [-q] [-n] [-f FMT] [-t CACHE] [-T SRC_CACHE] [-O OUTPUT_FMT] [-B BACKING_FILE] [-o OPTIONS] [-l SNAPSHOT_PARAM] [-S SPARSE_SIZE] [-r RATE_LIMIT] [-m NUM_COROUTINES] [-W] FILENAME [FILENAME2 [...]] OUTPUT_FILENAME
>> +.. option:: convert [--object OBJECTDEF] [--image-opts] [--target-image-opts] [--target-is-zero] [--bitmaps [--skip-broken-bitmaps]] [-U] [-C] [-c] [-p] [-q] [-n] [-f FMT] [-t CACHE] [-T SRC_CACHE] [-O OUTPUT_FMT] [-B BACKING_FILE [-F backing_fmt]] [-o OPTIONS] [-l SNAPSHOT_PARAM] [-S SPARSE_SIZE] [-r RATE_LIMIT] [-m NUM_COROUTINES] [-W] FILENAME [FILENAME2 [...]] OUTPUT_FILENAME
>
> s/backing_fmt/BACKING_FMT/ would be more consistent here
>
>> +++ b/qemu-img-cmds.hx
>> @@ -46,7 +46,7 @@ SRST
>> ERST
>>
>> DEF("convert", img_convert,
>> - "convert [--object objectdef] [--image-opts] [--target-image-opts] [--target-is-zero] [--bitmaps] [-U] [-C] [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fmt] [-B backing_file] [-o options] [-l snapshot_param] [-S sparse_size] [-r rate_limit] [-m num_coroutines] [-W] [--salvage] filename [filename2 [...]] output_filename")
>> + "convert [--object objectdef] [--image-opts] [--target-image-opts] [--target-is-zero] [--bitmaps] [-U] [-C] [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fmt] [-B backing_file [-F backing_fmt]] [-o options] [-l snapshot_param] [-S sparse_size] [-r rate_limit] [-m num_coroutines] [-W] [--salvage] filename [filename2 [...]] output_filename")
>> SRST
>> .. option:: convert [--object OBJECTDEF] [--image-opts] [--target-image-opts] [--target-is-zero] [--bitmaps] [-U] [-C] [-c] [-p] [-q] [-n] [-f FMT] [-t CACHE] [-T SRC_CACHE] [-O OUTPUT_FMT] [-B BACKING_FILE] [-o OPTIONS] [-l SNAPSHOT_PARAM] [-S SPARSE_SIZE] [-r RATE_LIMIT] [-m NUM_COROUTINES] [-W] [--salvage] FILENAME [FILENAME2 [...]] OUTPUT_FILENAME
>
> and I missed this line here. We have too much not-quite-identical
> duplication :( Followup patch coming.
>
That's for sure accidental complexity :)
--
Best regards,
Vladimir
prev parent reply other threads:[~2021-09-17 23:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 13:17 [PATCH] qemu-img: Add -F shorthand to convert Eric Blake
2021-09-15 8:20 ` Vladimir Sementsov-Ogievskiy
2021-09-15 8:33 ` Maxim Levitsky
2021-09-15 11:19 ` Hanna Reitz
2021-09-17 20:13 ` Eric Blake
2021-09-17 23:36 ` Vladimir Sementsov-Ogievskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30925a50-0b9b-ea3f-2a7f-f70588e9ba7d@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).