[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
- [PATCH v5 0/6] blkdebug: fix racing condition when iterating on, Emanuele Giuseppe Esposito, 2021/06/14
- [PATCH v5 1/6] blkdebug: refactor removal of a suspended request, Emanuele Giuseppe Esposito, 2021/06/14
- [PATCH v5 2/6] blkdebug: move post-resume handling to resume_req_by_tag, Emanuele Giuseppe Esposito, 2021/06/14
- [PATCH v5 3/6] blkdebug: track all actions, Emanuele Giuseppe Esposito, 2021/06/14
- [PATCH v5 4/6] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE, Emanuele Giuseppe Esposito, 2021/06/14
- [PATCH v5 5/6] block/blkdebug: remove new_state field and instead use a local variable, Emanuele Giuseppe Esposito, 2021/06/14
- Re: [PATCH v5 5/6] block/blkdebug: remove new_state field and instead use a local variable,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v5 6/6] blkdebug: protect rules and suspended_reqs with a lock, Emanuele Giuseppe Esposito, 2021/06/14