Commit 9adc1cb49af8d fixed a bug about unaligned (to dirty bitmap granularity) guest writes (and discards) by simply requesting corresponding alignment on mirror-top filter. However forcing large alignment obviously decreases performance of unaligned requests.
So it's time for a new solution which is in 04. And 05 reverts 9adc1cb49af8d. v2: 01: new fix (do we need it for stable?) 02,03,05: add Max's r-b 04: fix bitmap handling improve comments Vladimir Sementsov-Ogievskiy (5): hbitmap: handle set/reset with zero length block/mirror: simplify do_sync_target_write block/block-backend: add blk_co_pwritev_part block/mirror: support unaligned write in active mirror Revert "mirror: Only mirror granularity-aligned chunks" include/sysemu/block-backend.h | 4 + block/block-backend.c | 17 +++- block/mirror.c | 181 ++++++++++++++++----------------- util/hbitmap.c | 8 ++ 4 files changed, 114 insertions(+), 96 deletions(-) -- 2.21.0