On 03.02.23 10:18, Alexander Ivanov wrote:
We will add more and more checks so we need a better code structure
in parallels_co_check. Let each check performs in a separate loop
in a separate helper.

Signed-off-by: Alexander Ivanov <alexander.iva...@virtuozzo.com>
---
  block/parallels.c | 80 ++++++++++++++++++++++++++++-------------------
  1 file changed, 48 insertions(+), 32 deletions(-)

diff --git a/block/parallels.c b/block/parallels.c
index 994528d93c..c7d37c4580 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -480,21 +480,57 @@ static int parallels_check_outside_image(BlockDriverState 
*bs,
      return 0;
  }
+static int parallels_check_leak(BlockDriverState *bs,
+                                BdrvCheckResult *res,
+                                BdrvCheckMode fix)

Like parallels_check_outside_image(), I think ideally this should be marked as `coroutine_fn GRAPH_RDLOCK` because of the block layer functions it calls.

Hanna


Reply via email to