From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, berto@igalia.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2 7/7] block: drop tighten_restrictions
Date: Mon, 9 Nov 2020 14:40:49 +0100 [thread overview]
Message-ID: <d8ded6ef-fd4d-6c8b-1f57-d81e1675f080@redhat.com> (raw)
In-Reply-To: <20201106124241.16950-8-vsementsov@virtuozzo.com>
On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote:
> The only users of this thing are:
> 1. bdrv_child_try_set_perm, to ignore failures on loosen restrictions
> 2. assertion in bdrv_replace_child
> 3. assertion in bdrv_inactivate_recurse
>
> Assertions are not enough reason for overcomplication the permission
> update system. So, look at bdrv_child_try_set_perm.
>
> We are interested in tighten_restrictions only on failure. But on
> failure this field is not reliable: we may fail in the middle of
> permission update, some nodes are not touched and we don't know should
> their permissions be tighten or not. So, we rely on the fact that if we
> loose restrictions on some node (or BdrvChild), we'll not tighten
> restriction in the whole subtree as part of this update (assertions 2
> and 3 rely on this fact as well). And, if we rely on this fact anyway,
> we can just check it on top, and don't pass additional pointer through
> the whole recursive infrastructure.
>
> Note also, that further patches will fix real bugs in permission update
> system, so now is good time to simplify it, as a help for further
> refactorings.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block.c | 88 +++++++++++----------------------------------------------
> 1 file changed, 17 insertions(+), 71 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
next prev parent reply other threads:[~2020-11-09 13:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 12:42 [PATCH v2 0/7] block: permission update fix & refactor Vladimir Sementsov-Ogievskiy
2020-11-06 12:42 ` [PATCH v2 1/7] block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache() Vladimir Sementsov-Ogievskiy
2020-11-06 12:47 ` Alberto Garcia
2020-11-06 12:42 ` [PATCH v2 2/7] block: add bdrv_replace_node_common() Vladimir Sementsov-Ogievskiy
2020-11-06 15:27 ` Alberto Garcia
2020-11-06 12:42 ` [PATCH v2 3/7] block: make bdrv_drop_intermediate() less wrong Vladimir Sementsov-Ogievskiy
2020-11-06 15:12 ` Alberto Garcia
2020-11-06 12:42 ` [PATCH v2 4/7] block: add bdrv_refresh_perms() helper Vladimir Sementsov-Ogievskiy
2020-11-06 15:14 ` Alberto Garcia
2020-11-09 7:04 ` Vladimir Sementsov-Ogievskiy
2020-11-09 13:44 ` Vladimir Sementsov-Ogievskiy
2020-11-06 12:42 ` [PATCH v2 5/7] block: bdrv_set_perm() drop redundant parameters Vladimir Sementsov-Ogievskiy
2020-11-09 12:20 ` Max Reitz
2020-11-09 12:37 ` Vladimir Sementsov-Ogievskiy
2020-11-06 12:42 ` [PATCH v2 6/7] block: bdrv_child_set_perm() " Vladimir Sementsov-Ogievskiy
2020-11-09 12:41 ` Max Reitz
2020-11-06 12:42 ` [PATCH v2 7/7] block: drop tighten_restrictions Vladimir Sementsov-Ogievskiy
2020-11-09 13:40 ` Max Reitz [this message]
2020-11-09 14:41 ` [PATCH v2 0/7] block: permission update fix & refactor Max Reitz
2020-11-09 15:19 ` Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8ded6ef-fd4d-6c8b-1f57-d81e1675f080@redhat.com \
--to=mreitz@redhat.com \
--cc=berto@igalia.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).