All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] block: fix assert in qcow2_get_specific_info
Date: Tue, 2 Feb 2016 14:20:04 +0100	[thread overview]
Message-ID: <56B0AD04.1020303@redhat.com> (raw)
In-Reply-To: <1453273940-15382-2-git-send-email-den@openvz.org>



On 20/01/2016 08:12, Denis V. Lunev wrote:
> There is a possibility to hit assert qcow2_get_specific_info that
> s->qcow_version is undefined. This happens when VM in starting from
> suspended state, i.e. it processes incoming migration, and in the same
> time 'info block' is called.
> 
> The problem is that in the qcow2_invalidate_cache closes and the image
> and memsets BDRVQcowState in the middle.
> 
> The patch moves processing of qcow2_get_specific_info into coroutine
> context and ensures that qcow2_invalidate_cache and qcow2_get_specific_info
> can not run simultaneosly.

I'm sitting next to Kevin :) and this is not a qcow2 bug.

The problem is that qcow2_invalidate_cache is being called in coroutine
context.  The process_incoming_migration_co code starting with
bdrv_invalidate_cache_all should be moved out of the coroutine and into
the main loop.  You can use a bottom half to get out of coroutine context.

The result should be a much simpler patch, too.

Thanks, and sorry for the delay.  I saw qcow2 in the title and assumed
it was something I knew nothing about. :)

Paolo

  parent reply	other threads:[~2016-02-02 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  7:12 [Qemu-devel] [PATCH 0/2] fixes for bdrv_invalidate_cache Denis V. Lunev
2016-01-20  7:12 ` [Qemu-devel] [PATCH 1/2] block: fix assert in qcow2_get_specific_info Denis V. Lunev
2016-01-29  8:39   ` Denis V. Lunev
2016-02-02 13:20   ` Paolo Bonzini [this message]
2016-02-02 13:49     ` Denis V. Lunev
2016-02-02 14:26       ` Paolo Bonzini
2016-01-20  7:12 ` [Qemu-devel] [PATCH 2/2] nbd: add missed aio_context_acquire in nbd_export_new Denis V. Lunev
2016-01-26 11:37   ` Paolo Bonzini
2016-01-25 11:59 ` [Qemu-devel] [PATCH 0/2] fixes for bdrv_invalidate_cache Denis V. Lunev
2016-02-02  9:50 ` Denis V. Lunev

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=56B0AD04.1020303@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --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 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.