Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-03-10 Thread Kevin Wolf
Am 10.03.2021 um 12:08 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.02.2021 21:38, Kevin Wolf wrote: > > Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 28.01.2021 20:13, Kevin Wolf wrote: > > > > Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben:

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-03-10 Thread Vladimir Sementsov-Ogievskiy
03.02.2021 21:38, Kevin Wolf wrote: Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: 28.01.2021 20:13, Kevin Wolf wrote: Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: 27.01.2021 21:38, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-02-03 Thread Vladimir Sementsov-Ogievskiy
03.02.2021 21:38, Kevin Wolf wrote: Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: 28.01.2021 20:13, Kevin Wolf wrote: Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: 27.01.2021 21:38, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-02-03 Thread Kevin Wolf
Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > 28.01.2021 20:13, Kevin Wolf wrote: > > Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 27.01.2021 21:38, Kevin Wolf wrote: > > > > Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben:

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 20:13, Kevin Wolf wrote: Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: 27.01.2021 21:38, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: -static int bdrv_check_perm(BlockDriverState *bs, BlockReopenQueue *q, -

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-01-28 Thread Kevin Wolf
Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > 27.01.2021 21:38, Kevin Wolf wrote: > > Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > -static int bdrv_check_perm(BlockDriverState *bs, BlockReopenQueue *q, > > > -

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
27.01.2021 21:38, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() to update nodes in topological sort order instead of simple DFS. With topologically sorted nodes, we update a node

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-01-27 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() > to update nodes in topological sort order instead of simple DFS. With > topologically sorted nodes, we update a node only when all its parents > already

[PATCH v2 15/36] block: use topological sort for permission update

2020-11-27 Thread Vladimir Sementsov-Ogievskiy
Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() to update nodes in topological sort order instead of simple DFS. With topologically sorted nodes, we update a node only when all its parents already updated. With DFS it's not so. Consider the following example: A -+