On 24/02/2026 14:58, Kevin Wolf wrote:
Am 20.02.2026 um 15:00 hat Fiona Ebner geschrieben:
Am 19.02.26 um 9:25 PM schrieb Kevin Wolf:
@@ -1672,9 +1673,9 @@ bdrv_mirror_top_do_write(BlockDriverState *bs, 
MirrorMethod method,
          abort();
      }
- if (!copy_to_target && s->job && s->job->dirty_bitmap) {
+    if (!copy_to_target) {
          qatomic_set(&s->job->actively_synced, false);
Here, we must check that s->job is set for the qatomic_set().

Other than that, the patch looks good to me, thanks!
Thanks, good catch. I'm squashing in this change:

diff --git a/block/mirror.c b/block/mirror.c
index abdffc6de86..fa1d975eb9f 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1677,7 +1677,9 @@ bdrv_mirror_top_do_write(BlockDriverState *bs, 
MirrorMethod method,
      }

      if (!copy_to_target) {
-        qatomic_set(&s->job->actively_synced, false);
+        if (s->job) {
+            qatomic_set(&s->job->actively_synced, false);
+        }
          bdrv_set_dirty_bitmap(s->dirty_bitmap, offset, bytes);
      }

Can I add your R-b with this?

Jean-Louis, do you want to give this patch a test if it still fixes your
problem? The approach is a bit different from what we tried initially.
We are running our test case for +24hours now without any issue with this patch included. I am currently rebuilding el9 qemu with this patch included to run on our production machines that had this corruption.
Let me come back in some days to fully confirm it's also fixed there :)

Kevin

Thanks for the effort on this! Good to see this nasty issue getting resolved! :)

Jean-Louis

Reply via email to