|
From: | Max Reitz |
Subject: | Re: [PATCH v2 5/7] block: bdrv_set_perm() drop redundant parameters. |
Date: | Mon, 9 Nov 2020 13:20:04 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
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 <vsementsov@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 <mreitz@redhat.com>
[Prev in Thread] | Current Thread | [Next in Thread] |