[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 19/36] block: fix bdrv_replace_node_common
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 19/36] block: fix bdrv_replace_node_common |
Date: |
Wed, 3 Feb 2021 19:23:37 +0100 |
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben:
> inore_children thing doesn't help to track all propagated permissions
> of children we want to ignore. The simplest way to correctly update
> permissions is update graph first and then do permission update. In
> this case we just referesh permissions for the whole subgraph (in
> topological-sort defined order) and everything is correctly calculated
> automatically without any ignore_children.
>
> So, refactor bdrv_replace_node_common to first do graph update and then
> refresh the permissions.
>
> Test test_parallel_exclusive_write() now pass, so move it out of
> debugging "if".
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
> index 0d62e05ddb..93a5941a9b 100644
> --- a/tests/test-bdrv-graph-mod.c
> +++ b/tests/test-bdrv-graph-mod.c
> @@ -294,20 +294,11 @@ static void test_parallel_perm_update(void)
> bdrv_child_refresh_perms(top, top->children.lh_first, &error_abort);
>
> assert(c_fl1->perm & BLK_PERM_WRITE);
> + bdrv_unref(top);
> }
Why do have this addition in this patch? Shouldn't the changed function
behave the same as before with respect to referenced nodes?
Kevin
- Re: [PATCH v2 19/36] block: fix bdrv_replace_node_common,
Kevin Wolf <=