mirror: Freeze backing chain for sync=top
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | mirror: Set s->base_overlay only if s->base is setblock/ | +5 | 0 replies | |
| 2/3 | mirror: Freeze backing chain for sync=topblock/ | +17 | 1 reply | |
| 3/3 | iotests/041: x-blockdev-reopen during mirrortests/ tests/ | +94 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] mirror: Freeze backing chain for sync=top
Hi,
On review of the “Deal with filters” series, Kevin noted that mirror doesn’t freeze its backing chain, even though we keep references to the base (for sync=top). That seems like a recipe for disaster, and as the test added in patch 3 shows, indeed it is.
Patch 1 could also be squashed into “mirror: Deal with filters”.
As for patch 2; maybe it would be sufficient to freeze the backing chain only down to base_overlay and until mirror_dirty_init() is done. Then we bdrv_ref(s->base) so can always be attached to the target when mirror completes. But I think the conservative approach I implemented here is fine until someone complains.
Max Reitz (3):
mirror: Set s->base_overlay only if s->base is set
mirror: Freeze backing chain for sync=top iotests/041: x-blockdev-reopen during mirror
block/mirror.c | 28 +++++++++--- tests/qemu-iotests/041 | 92 ++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/041.out | 4 +- 3 files changed, 116 insertions(+), 8 deletions(-)
Signature · 1 line
2.26.2