|
From: | Eric Blake |
Subject: | Re: [PATCH v4 08/10] nbd/server: introduce NBDExtentArray |
Date: | Thu, 27 Feb 2020 07:21:47 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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 <address@hidden> --- 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
[Prev in Thread] | Current Thread | [Next in Thread] |