OSDN Git Service

blkdebug: protect rules and suspended_reqs with a lock
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 14 Jun 2021 08:29:31 +0000 (10:29 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 19 Jul 2021 15:38:38 +0000 (17:38 +0200)
commit36109bff171ba0811fa4c723cecdf6c3561fa318
tree21679672f442a9a714a80232430152ba30db02ad
parent4153b553bd81e5b270b816699184df5d74c46805
blkdebug: protect rules and suspended_reqs with a lock

First, categorize the structure fields to identify what needs
to be protected and what doesn't.

We essentially need to protect only .state, and the 3 lists in
BDRVBlkdebugState.

Then, add the lock and mark the functions accordingly.

Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20210614082931.24925-7-eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/blkdebug.c