qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 5/6] block/blkdebug: remove new_state field and instead us


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v5 5/6] block/blkdebug: remove new_state field and instead use a local variable
Date: Sat, 19 Jun 2021 15:38:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

14.06.2021 11:29, Emanuele Giuseppe Esposito wrote:
There seems to be no benefit in using a field. Replace it with a local
variable, and move the state update before the yields.

The state update has do be done before the yields because now using
a local variable does not allow the new updated state to be visible
by the other yields.

Not sure that this sentence helps.. I just can't imagine how state update 
should work keeping in mind these yields :) And making state update more 
atomically makes sense to me just because it's simpler to understand.


Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>



--
Best regards,
Vladimir



reply via email to

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