qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] block: Drain source node in bdrv_replace_node()
Date: Wed, 22 May 2019 13:28:07 +0200	[thread overview]
Message-ID: <b6752c8d-7f1a-c7e2-a92e-355b5fc72e9e@redhat.com> (raw)
In-Reply-To: <20190521191638.32713-2-kwolf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

On 21.05.19 21:16, Kevin Wolf wrote:
> Instead of just asserting that no requests are in flight in
> bdrv_replace_node(), which is a requirement that most callers ignore, we
> can just drain the source node right there. This fixes at least starting
> a commit job while I/O is active on the backing chain, but probably
> other callers, too.
> 
> Having requests in flight on the target node isn't a problem because the
> target just gets new parents, but the call path of running requests
> isn't modified. So we can just drop this assertion without a replacement.
> 
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1711643
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

I had a similar problem with throttle on a blockdev-mirror job.  I
suppose this is more general than my “Don’t increment in_flight in
bdrv_drain_invoke()” solution, that probably doesn’t even work for your
case. :-)

Reviewed-by: Max Reitz <mreitz@redhat.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-05-22 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 19:16 [Qemu-devel] [PATCH 0/2] commit: Fix crash on job start with active I/O Kevin Wolf
2019-05-21 19:16 ` [Qemu-devel] [PATCH 1/2] block: Drain source node in bdrv_replace_node() Kevin Wolf
2019-05-22 11:28   ` Max Reitz [this message]
2019-05-21 19:16 ` [Qemu-devel] [PATCH 2/2] iotests: Test commit job start with concurrent I/O Kevin Wolf
2019-05-22 11:48   ` Max Reitz

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=b6752c8d-7f1a-c7e2-a92e-355b5fc72e9e@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).