All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH v4 08/10] nbd/server: introduce NBDExtentArray
Date: Thu, 27 Feb 2020 07:21:47 -0600	[thread overview]
Message-ID: <18b6e7e8-c4a0-0c9e-e4f1-aa5d460f3592@redhat.com> (raw)
In-Reply-To: <f23161d4-0bff-30aa-6700-70c532ff8db5@virtuozzo.com>

On 2/27/20 6:46 AM, Vladimir Sementsov-Ogievskiy wrote:
> 26.02.2020 18:06, Eric Blake wrote:
>> On 2/5/20 5:20 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Introduce NBDExtentArray class, to handle extents list creation in more
>>> controlled way and with fewer OUT parameters in functions.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>> ---
>>>   nbd/server.c | 210 +++++++++++++++++++++++++++++----------------------
>>>   1 file changed, 118 insertions(+), 92 deletions(-)
>>>
>>
>>> +
>>> +/* Further modifications of the array after conversion are abandoned */
>>> +static void nbd_extent_array_convert_to_be(NBDExtentArray *ea)
>>> +{
>>> +    int i;
>>> +
>>> +    assert(!ea->converted_to_be);
>>
>> Comment is stale - further modifications after conversion are a bug 
>> that aborts the program, not abandoned.
> 
> I always thought that "abandoned" is something that must not be done, so 
> the word works here. But I don't know English well).

Rephrasing my comment, further modifications are "a bug that aborts the 
program", rather than "an ignored action that gets abandoned".

> May be:
> 
> "No further modifications of the array allowed after converting to BE."? 

Yes, that wording is better.

> Is it better?
> 
> Or just drop the comment.

That's also viable; the code reads fairly well even without the comment.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-02-27 13:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 11:20 [PATCH v4 00/10] Further bitmaps improvements Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 01/10] hbitmap: assert that we don't create bitmap larger than INT64_MAX Vladimir Sementsov-Ogievskiy
2020-02-05 15:14   ` Eric Blake
2020-02-05 11:20 ` [PATCH v4 02/10] hbitmap: move hbitmap_iter_next_word to hbitmap.c Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 03/10] hbitmap: unpublish hbitmap_iter_skip_words Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 04/10] hbitmap: drop meta bitmaps as they are unused Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t Vladimir Sementsov-Ogievskiy
2020-02-26 12:39   ` Max Reitz
2020-02-05 11:20 ` [PATCH v4 06/10] block/dirty-bitmap: add _next_dirty API Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 07/10] block/dirty-bitmap: improve _next_dirty_area API Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 08/10] nbd/server: introduce NBDExtentArray Vladimir Sementsov-Ogievskiy
2020-02-26 15:06   ` Eric Blake
2020-02-27 12:46     ` Vladimir Sementsov-Ogievskiy
2020-02-27 13:21       ` Eric Blake [this message]
2020-03-06  7:44         ` Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 09/10] nbd/server: use bdrv_dirty_bitmap_next_dirty_area Vladimir Sementsov-Ogievskiy
2020-02-05 11:20 ` [PATCH v4 10/10] block/qcow2-bitmap: use bdrv_dirty_bitmap_next_dirty Vladimir Sementsov-Ogievskiy
2020-02-26  9:27 ` [PATCH v4 00/10] Further bitmaps improvements Vladimir Sementsov-Ogievskiy
2020-02-26 13:13 ` Max Reitz
2020-03-06  7:45   ` Vladimir Sementsov-Ogievskiy
2020-03-10 17:17     ` Max Reitz
2020-03-11  6:17       ` Vladimir Sementsov-Ogievskiy
2020-03-11  9:55         ` Max Reitz
2020-03-11 13:58           ` Vladimir Sementsov-Ogievskiy
2020-03-11 17:03             ` John Snow
2020-03-12  5:59               ` Vladimir Sementsov-Ogievskiy
2020-03-12 16:33                 ` John Snow
2020-03-12 20:41                 ` John Snow
2020-03-13  6:43                   ` Vladimir Sementsov-Ogievskiy

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=18b6e7e8-c4a0-0c9e-e4f1-aa5d460f3592@redhat.com \
    --to=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.