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 <vsement...@virtuozzo.com> > --- > block/nbd.c | 103 ++++++++++++++-------------------------------------- > 1 file changed, 27 insertions(+), 76 deletions(-) Reviewed-by: Roman Kagan <rvka...@yandex-team.ru>