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(-) -- 2.26.2