public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: qemu-block@nongnu.org, hreitz@redhat.com,
	vsementsov@yandex-team.ru, jsnow@redhat.com,
	jean-louis@dupond.be, dionbosschieter@gmail.com,
	qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH] mirror: Fix missed dirty bitmap writes during startup
Date: Tue, 24 Feb 2026 14:58:06 +0100	[thread overview]
Message-ID: <aZ2ubi7GsYmGmcl2@redhat.com> (raw)
In-Reply-To: <46ff60a0-56c7-49f0-ae8f-6a26504409b9@proxmox.com>

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.

Kevin



  reply	other threads:[~2026-02-24 13:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 20:24 [PATCH] mirror: Fix missed dirty bitmap writes during startup Kevin Wolf
2026-02-20 14:00 ` Fiona Ebner
2026-02-24 13:58   ` Kevin Wolf [this message]
2026-02-24 14:06     ` Fiona Ebner
2026-02-25 12:32     ` Jean-Louis Dupond
2026-03-02  9:49       ` Jean-Louis Dupond
2026-03-02 13:13         ` Kevin Wolf
2026-03-05 18:34 ` Vladimir Sementsov-Ogievskiy
2026-03-06  9:34   ` Kevin Wolf
2026-03-24 14:44     ` Vladimir Sementsov-Ogievskiy
2026-03-25 10:13       ` Fiona Ebner
2026-03-08  8:25 ` Michael Tokarev
2026-03-10 16:22   ` Fiona Ebner
2026-03-10 18:35     ` Michael Tokarev
2026-03-11 11:10       ` Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aZ2ubi7GsYmGmcl2@redhat.com \
    --to=kwolf@redhat.com \
    --cc=dionbosschieter@gmail.com \
    --cc=f.ebner@proxmox.com \
    --cc=hreitz@redhat.com \
    --cc=jean-louis@dupond.be \
    --cc=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox