On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote:
We should never set permissions other than cumulative permissions of
parents. During bdrv_reopen_multiple() we _check_ for synthetic
permissions but when we do _set_ the graph is already updated.
Add an assertion to bdrv_reopen_multiple(), other cases are more
obvious.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
  block.c | 29 +++++++++++++++--------------
  1 file changed, 15 insertions(+), 14 deletions(-)

(Perhaps bdrv_commit_perm() might be a better name then, but I’m afraid such a name change might be quite invasive (because AFAIR *_set_perm is used quite often).)

Reviewed-by: Max Reitz <mre...@redhat.com>


Reply via email to