All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: peterx@redhat.com, qemu-block@nongnu.org,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Andrey Drobyshev" <andrey.drobyshev@virtuozzo.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Dr . David Alan Gilbert" <dave@treblig.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v2 5/6] migration/block: Fix possible race with block_inactive
Date: Mon, 16 Dec 2024 12:18:09 -0300	[thread overview]
Message-ID: <87y10fwtam.fsf@suse.de> (raw)
In-Reply-To: <20241206230838.1111496-6-peterx@redhat.com>

Peter Xu <peterx@redhat.com> writes:

> Src QEMU sets block_inactive=true very early before the invalidation takes
> place.  It means if something wrong happened during setting the flag but
> before reaching qemu_savevm_state_complete_precopy_non_iterable() where it
> did the invalidation work, it'll make block_inactive flag inconsistent.
>
> For example, think about when qemu_savevm_state_complete_precopy_iterable()
> can fail: it will have block_inactive set to true even if all block drives
> are active.
>
> Fix that by only update the flag after the invalidation is done.
>
> No Fixes for any commit, because it's not an issue if bdrv_activate_all()
> is re-entrant upon all-active disks - false positive block_inactive can
> bring nothing more than "trying to active the blocks but they're already
> active".  However let's still do it right to avoid the inconsistent flag
> v.s. reality.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2024-12-16 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 23:08 [PATCH v2 0/6] migration/block: disk activation rewrite Peter Xu
2024-12-06 23:08 ` [PATCH v2 1/6] migration: Add helper to get target runstate Peter Xu
2024-12-06 23:08 ` [PATCH v2 2/6] qmp/cont: Only activate disks if migration completed Peter Xu
2024-12-16 15:10   ` Fabiano Rosas
2024-12-06 23:08 ` [PATCH v2 3/6] migration/block: Make late-block-active the default Peter Xu
2024-12-16 15:16   ` Fabiano Rosas
2024-12-06 23:08 ` [PATCH v2 4/6] migration/block: Apply late-block-active behavior to postcopy Peter Xu
2024-12-16 15:17   ` Fabiano Rosas
2024-12-06 23:08 ` [PATCH v2 5/6] migration/block: Fix possible race with block_inactive Peter Xu
2024-12-16 15:18   ` Fabiano Rosas [this message]
2024-12-06 23:08 ` [PATCH v2 6/6] migration/block: Rewrite disk activation Peter Xu
2024-12-16 15:58   ` Fabiano Rosas
2024-12-16 18:33     ` Peter Xu
2024-12-17 15:26 ` [PATCH v2 0/6] migration/block: disk activation rewrite Fabiano Rosas

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=87y10fwtam.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=berrange@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.