block: reject persistent bitmaps a node can never store
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest3 patches 8 repliesIn review
Changes in v2 from the cover letter
* approach changed to deny rather than adopt (Vladimir)
* added patch to add permission check on migration path
* added patch to change permissions check on bitmap drop to more natural
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | block/monitor: reject persistent bitmap add on a read-only nodeblock/ qapi/ tests/ +1 more | +62 | 2 replies | |
| 2/3 | migration/block-dirty-bitmap: reject bitmap load onto ro nodemigration/ tests/ tests/ | +50 | 1 reply | |
| 3/3 | block/monitor: allow dropping a bitmap never stored on diskblock/ block/ tests/ | +12 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Vladimir Sementsov-Ogievskiy |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] block: reject persistent bitmaps a node can never store
qmp_block_dirty_bitmap_add() and the incoming-migration bitmap loader both create a persistent bitmap with bdrv_create_dirty_bitmap(), which always creates it writable, without checking whether the node can actually be written to. A persistent bitmap added to an already read-only or inactive node stays writable in memory on a node that can never store it, and the next global inactivation (migration completion, save, or any other bdrv_inactivate_all() caller) fails trying to flush it back:
Lost persistent bitmaps during inactivation of node '<node>': No write access migration_block_inactivate: bdrv_inactivate_all() failed: -22
Patch 1 rejects this at block-dirty-bitmap-add (and, wrapped in a transaction, denies the whole transaction). Patch 2 closes the same hole on the incoming-migration path. Patch 3 fixes a knock-on regression from patch 1's approach: a bitmap that was rejected from ever being written can still exist in memory read-only and must remain removable without requiring write access.
v1 -> v2
* approach changed to deny rather than adopt (Vladimir)
* added patch to add permission check on migration path
* added patch to change permissions check on bitmap drop to more natural
Denis V. Lunev (3):
block/monitor: reject persistent bitmap add on a read-only node migration/block-dirty-bitmap: reject bitmap load onto ro node block/monitor: allow dropping a bitmap never stored on disk
block/monitor/bitmap-qmp-cmds.c | 19 +++++++---- block/qcow2-bitmap.c | 9 +++++ migration/block-dirty-bitmap.c | 22 +++++++++---- qapi/block-core.json | 4 ++- tests/qemu-iotests/tests/migrate-bitmaps-test | 33 +++++++++++++++++++ .../tests/migrate-bitmaps-test.out | 4 +-- .../tests/remove-bitmap-from-backing | 29 +++++++++++++++- .../tests/remove-bitmap-from-backing.out | 22 ++++++++++++- 8 files changed, 124 insertions(+), 18 deletions(-)
Signature · 1 line
2.53.0