block: move BQL logic of bdrv_co_invalidate_cache in bdrv_activate
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Wed, 9 Feb 2022 10:54:52 +0000 (05:54 -0500)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Mar 2022 17:14:40 +0000 (18:14 +0100)
commit11d0c9b37e94959662f6bcd640aa33137e11dcac
tree468e420a657a0cb29b7269345fa4c006d2cfa01c
parent3b71719462b869463e34394e56c74644672c69e5
block: move BQL logic of bdrv_co_invalidate_cache in bdrv_activate

Split bdrv_co_invalidate cache in two: the Global State (under BQL)
code that takes care of permissions and running GS callbacks,
and leave only the I/O code (->bdrv_co_invalidate_cache) running in
the I/O coroutine.

The only side effect is that bdrv_co_invalidate_cache is not
recursive anymore, and so is every direct call to
bdrv_invalidate_cache().

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220209105452.1694545-6-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c