public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Jean-Louis Dupond <jean-louis@dupond.be>
Cc: Fiona Ebner <f.ebner@proxmox.com>,
	qemu-block@nongnu.org, hreitz@redhat.com,
	vsementsov@yandex-team.ru, jsnow@redhat.com,
	dionbosschieter@gmail.com, qemu-devel@nongnu.org,
	qemu-stable@nongnu.org
Subject: Re: [PATCH] mirror: Fix missed dirty bitmap writes during startup
Date: Mon, 2 Mar 2026 14:13:00 +0100	[thread overview]
Message-ID: <aaWM3DI5ISFPFrZ0@redhat.com> (raw)
In-Reply-To: <adc4bc7a-2ac3-4e37-8041-fcff77d96e15@dupond.be>

Am 02.03.2026 um 10:49 hat Jean-Louis Dupond geschrieben:
> 
> On 25/02/2026 13:32, Jean-Louis Dupond wrote:
> > 
> > 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 :)
> Everything stays stable (without corruption), after a lot of servers in
> backup already with the patch.
> So therefor:
> 
> Tested-by: Jean-Louis Dupond <jean-louis@dupond.be>

Great, thanks for your testing!

Kevin



  reply	other threads:[~2026-03-02 13:13 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
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 [this message]
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=aaWM3DI5ISFPFrZ0@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