From: John Snow <jsnow@redhat.com>
To: Eric Blake <eblake@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com,
mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com,
den@openvz.org
Subject: Re: [Qemu-devel] [PATCH 07/21] qcow2: add dirty bitmaps extension
Date: Tue, 15 Nov 2016 17:45:08 -0500 [thread overview]
Message-ID: <889e1dbf-3b67-9730-f00b-d0ea87a15045@redhat.com> (raw)
In-Reply-To: <4f079564-831d-3d06-ceea-29f3b17d62cf@redhat.com>
On 11/15/2016 05:39 PM, Eric Blake wrote:
> On 11/15/2016 03:42 PM, John Snow wrote:
>>
>>
>> On 11/09/2016 01:17 PM, Vladimir Sementsov-Ogievskiy wrote:
>>> Add dirty bitmap extension as specified in docs/specs/qcow2.txt.
>>> For now, just mirror extension header into Qcow2 state and check
>>> constraints.
>>>
>>> For now, disable image resize if it has bitmaps. It will be fixed later.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>> ---
>
>>> + if (!(s->autoclear_features &
>>> QCOW2_AUTOCLEAR_DIRTY_BITMAPS)) {
>>> + fprintf(stderr,
>>> + "WARNING: bitmaps_ext: autoclear flag is not "
>>> + "set, all bitmaps will be considered as
>>> inconsistent");
>>> + break;
>>> + }
>>> +
>>
>> I might drop the "as" and just say "WARNING: bitmaps_ext: [the]
>> autoclear flag is not set. All bitmaps will be considered inconsistent."
>
> Even the 'bitmaps_ext:' prefix seems a bit redundant, since the rest of
> the message talks about bitmaps.
>
>>
>> This may be a good place for Eric to check our English.
>>
>
> Maybe take the message from a different angle:
>
> WARNING: all bitmaps are considered inconsistent since the autoclear
> flag was cleared
>
> or
>
> WARNING: the autoclear flag was cleared, so all bitmaps are considered
> inconsistent
>
> or even skip the technical details, and report it with a longer message
> but while still sounding legible:
>
> WARNING: a program lacking bitmap support modified this file, so all
> bitmaps are now considered inconsistent
>
>
>>> +
>>> + if (bitmaps_ext.nb_bitmaps > QCOW_MAX_DIRTY_BITMAPS) {
>>> + error_setg(errp, "ERROR: bitmaps_ext: "
>>> + "too many dirty bitmaps");
>>
>> I might opt for something more like "File %s has %d bitmaps, exceeding
>> the QEMU supported maximum of %d" to be a little more informative than
>> "too many." (How many is too many? How many do we have?)
>>
>
> The use of ERROR: in error_setg() seems over the top.
>
> John's proposed wording is nice, here.
>
>>> + return -EINVAL;
>>> + }
>>> +
>>> + if (bitmaps_ext.nb_bitmaps == 0) {
>>> + error_setg(errp, "ERROR: bitmaps_ext: "
>>> + "found bitmaps extension with zero
>>> bitmaps");
>
> So why is it an error to have a bitmaps extension but no bitmaps
> allocated? Is that too strict?
>
> Again, the ERROR: prefix is a bit much in error_setg().
>
We wrote it that way in the spec:
````
The fields of the bitmaps extension are:
Byte 0 - 3: nb_bitmaps
The number of bitmaps contained in the image. Must be
greater than or equal to 1.
````
So if we have no bitmaps, we must have no header.
>
>>
>>> + if (bitmaps_ext.bitmap_directory_size >
>>> + QCOW_MAX_DIRTY_BITMAP_DIRECTORY_SIZE) {
>>> + error_setg(errp, "ERROR: bitmaps_ext: "
>>> + "too large dirty bitmap directory");
>>> + return -EINVAL;
>>> + }
>>> +
>>
>> "Too large dirty bitmap" is an awkward phrasing, because it turns the
>> entire message into a large compound noun.
>>
>> I suggest working in a verb into the message, like "is" or "exceeds,"
>> here are some suggestions:
>>
>> "[the] dirty bitmap directory size is too large" or "[the] dirty bitmap
>> directory size (%zu) exceeds [the] maximum supported size (%zu)"
>
> The latter is the most informative.
>
>>
>> I can't decide if it's appropriate to include or exclude the article.
>
> Yep, choosing when to use articles is sometimes subjective.
>
> the/blank sounds odd - it's the only combo I'd avoid
> blank/blank seems reasonable, and has the benefit of being short
> blank/the seems reasonable
> the/the seems rather formal, but still works
>
'Dirty bitmap directory size (%zu) exceeds the maximum supported size
(%zu)' is probably my favorite upon review.
>>
>> Luckily nobody else knows how English works either.
>
> What, there's rules to follow? :)
>
Not that I am aware of. Thanks for the proofreading.
--
—js
next prev parent reply other threads:[~2016-11-15 22:45 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 18:17 [Qemu-devel] [PATCH v8 00/21] qcow2: persistent dirty bitmaps Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 01/21] specs/qcow2: fix bitmap granularity qemu-specific note Vladimir Sementsov-Ogievskiy
2016-11-14 19:26 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 02/21] specs/qcow2: do not use wording 'bitmap header' Vladimir Sementsov-Ogievskiy
2016-11-14 20:08 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 03/21] hbitmap: improve dirty iter Vladimir Sementsov-Ogievskiy
2016-11-14 23:47 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 04/21] tests: add hbitmap iter test Vladimir Sementsov-Ogievskiy
2016-11-14 23:59 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 05/21] block: fix bdrv_dirty_bitmap_granularity signature Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 06/21] block/dirty-bitmap: add deserialize_ones func Vladimir Sementsov-Ogievskiy
2016-11-15 16:38 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 07/21] qcow2: add dirty bitmaps extension Vladimir Sementsov-Ogievskiy
2016-11-15 21:42 ` John Snow
2016-11-15 22:39 ` Eric Blake
2016-11-15 22:45 ` John Snow [this message]
2016-11-22 12:58 ` Vladimir Sementsov-Ogievskiy
2016-11-22 16:11 ` Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 08/21] block: introduce auto-loading bitmaps Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 09/21] qcow2: add .bdrv_load_autoloading_dirty_bitmaps Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 10/21] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 11/21] block: introduce persistent dirty bitmaps Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 12/21] block/dirty-bitmap: add bdrv_dirty_bitmap_next() Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps() Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 14/21] block: add bdrv_can_store_dirty_bitmap Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 15/21] qcow2: add .bdrv_can_store_dirty_bitmap Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 16/21] qmp: add persistent flag to block-dirty-bitmap-add Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 17/21] qmp: add autoload parameter " Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 18/21] qmp: add x-debug-block-dirty-bitmap-sha256 Vladimir Sementsov-Ogievskiy
2016-11-14 19:25 ` John Snow
2016-11-09 18:17 ` [Qemu-devel] [PATCH 19/21] iotests: test qcow2 persistent dirty bitmap Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 20/21] qcow2-refcount: rename inc_refcounts() and make it public Vladimir Sementsov-Ogievskiy
2016-11-09 18:17 ` [Qemu-devel] [PATCH 21/21] qcow2-bitmap: refcounts Vladimir Sementsov-Ogievskiy
2016-11-13 6:22 ` [Qemu-devel] [PATCH v8 00/21] qcow2: persistent dirty bitmaps no-reply
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=889e1dbf-3b67-9730-f00b-d0ea87a15045@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/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).