qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 05/10] block/nbd: drop thr->state


From: Roman Kagan
Subject: Re: [PATCH v2 05/10] block/nbd: drop thr->state
Date: Thu, 8 Apr 2021 19:36:37 +0300

On Thu, Apr 08, 2021 at 05:08:22PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Actually, the only bit of information we need is "is thread running or
> not". We don't need all these states. So, instead of thr->state add
> boolean variable thr->running and refactor the code.

There's certain redundancy between thr->refcnt and thr->running.  I
wonder if it makes sense to employ this.

Can be done later if deemed useful.

> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  block/nbd.c | 103 ++++++++++++++--------------------------------------
>  1 file changed, 27 insertions(+), 76 deletions(-)

Reviewed-by: Roman Kagan <rvkagan@yandex-team.ru>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]