Skip to content

block-backend: Retain permissions after migration

Hanna Reitz qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2block-backend: Retain permissions after migrationblock/block-backend.c+11 -02 replies
2/2iotests/migration-permissions: New testtests/qemu-iotests/tests/migration-permissions tests/qemu-iotests/tests/migration-permissions.out+106 -00 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPhilippe Mathieu-DaudéPeng LiangKevin Wolf
SeriesR-b
1/2R-b T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] block-backend: Retain permissions after migration

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
Signature · 1 line
2.33.1