From: Hanna Reitz <hreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Peng Liang <liangpeng10@huawei.com>,
Hanna Reitz <hreitz@redhat.com>,
qemu-devel@nongnu.org
Subject: [PATCH 0/2] block-backend: Retain permissions after migration
Date: Thu, 25 Nov 2021 14:53:15 +0100 [thread overview]
Message-ID: <20211125135317.186576-1-hreitz@redhat.com> (raw)
Hi,
Peng Liang has reported an issue regarding migration of raw images here:
https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html
It turns out that after migrating, all permissions are shared when they
weren’t before. The cause of the problem is that we deliberately delay
restricting the shared permissions until migration is really done (until
the runstate is no longer INMIGRATE) and first share all permissions;
but this causes us to lose the original shared permission mask and
overwrites it with BLK_PERM_ALL, so once we do try to restrict the
shared permissions, we only again share them all.
Fix this by saving the set of shared permissions through the first
blk_perm_set() call that shares all; and add a regression test.
I don’t believe we have to fix this in 6.2, because I think this bug has
existed for four years now. (I.e. it isn’t critical, and it’s no
regression.)
Hanna Reitz (2):
block-backend: Retain permissions after migration
iotests/migration-permissions: New test
block/block-backend.c | 11 ++
.../qemu-iotests/tests/migration-permissions | 101 ++++++++++++++++++
.../tests/migration-permissions.out | 5 +
3 files changed, 117 insertions(+)
create mode 100755 tests/qemu-iotests/tests/migration-permissions
create mode 100644 tests/qemu-iotests/tests/migration-permissions.out
--
2.33.1
next reply other threads:[~2021-11-25 13:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-25 13:53 Hanna Reitz [this message]
2021-11-25 13:53 ` [PATCH 1/2] block-backend: Retain permissions after migration Hanna Reitz
2021-11-25 14:04 ` Philippe Mathieu-Daudé
2021-11-26 8:18 ` Peng Liang via
2021-11-25 13:53 ` [PATCH 2/2] iotests/migration-permissions: New test Hanna Reitz
2021-12-10 16:10 ` [PATCH 0/2] block-backend: Retain permissions after migration Kevin Wolf
2022-01-10 11:51 ` Peng Liang via
2022-01-14 12:45 ` Hanna Reitz
2022-01-14 12:42 ` Hanna Reitz
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=20211125135317.186576-1-hreitz@redhat.com \
--to=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=liangpeng10@huawei.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).