All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-block@nongnu.org, kwolf@redhat.com, aik@ozlabs.ru,
	qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE
Date: Mon, 6 Nov 2017 21:25:53 -0500	[thread overview]
Message-ID: <20171107022553.GB18521@localhost.localdomain> (raw)
In-Reply-To: <20171106202343.GA18521@localhost.localdomain>

On Mon, Nov 06, 2017 at 03:23:43PM -0500, Jeff Cody wrote:
> On Fri, Nov 03, 2017 at 02:08:13PM +0300, Denis V. Lunev wrote:
> > On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote:
> > > On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote:
> > >> If we write or modify the image file while the QEMU run state is
> > >> INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set.  This will cause
> > >> an assert, since the image is marked inactive.  Make sure we obey this
> > >> flag.
> > >>
> > >> Signed-off-by: Jeff Cody <jcody@redhat.com>
> > >> ---
> > >>  block/parallels.c | 7 ++-----
> > >>  1 file changed, 2 insertions(+), 5 deletions(-)
> > >>
> > >> diff --git a/block/parallels.c b/block/parallels.c
> > >> index 2b6c6e5709..7b7a3efa1d 100644
> > >> --- a/block/parallels.c
> > >> +++ b/block/parallels.c
> > >> @@ -708,7 +708,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
> > >>          s->prealloc_mode = PRL_PREALLOC_MODE_FALLOCATE;
> > >>      }
> > >>  
> > >> -    if (flags & BDRV_O_RDWR) {
> > >> +    if ((flags & BDRV_O_RDWR) && !(flags & BDRV_O_INACTIVE)) {
> > >>          s->header->inuse = cpu_to_le32(HEADER_INUSE_MAGIC);
> > >>          ret = parallels_update_header(bs);
> > >>          if (ret < 0) {
> > > Where do we ensure that HEADER_INUSE_MAGIC is set on the destination?
> > good point. it should be set in invalidate_cache following QCOW2 scheme.
> > Thus we should add that callback with this patch.
> > 
> 
> 
> Do we (intentionally) support migration with parallels?  I guess so, since
> it doesn't have migration blockers.

Hmm, I hit send prematurely...

Despite not having migration blockers, obviously nobody is using migration
with parallels; from v2.6.0 to now, attempting to do so causes QEMU to
assert due to the bug fixed in this patch.

Rather than implement .bdrv_invalidate_cache() in this series, I am going to
set a migration blocker in a separate patch (in this series), so that
migration is not supported.  Whenever .bdrv_invalidate_cache() is
implemented, then the blocker can be removed.

-Jeff

  reply	other threads:[~2017-11-07  2:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 13:10 [Qemu-devel] [PATCH v2 0/3] Don't write headers if BDS is INACTIVE Jeff Cody
2017-10-30 13:10 ` [Qemu-devel] [PATCH v2 1/3] block/vhdx.c: Don't blindly update the header Jeff Cody
2017-10-30 13:10 ` [Qemu-devel] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE Jeff Cody
2017-11-03 11:05   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-11-03 11:08     ` Denis V. Lunev
2017-11-06 20:23       ` Jeff Cody
2017-11-07  2:25         ` Jeff Cody [this message]
2017-10-30 13:10 ` [Qemu-devel] [PATCH v2 3/3] qemu-iotests: update unsupported image formats in 194 Jeff Cody
2017-11-02  1:17 ` [Qemu-devel] [PATCH v2 0/3] Don't write headers if BDS is INACTIVE Alexey Kardashevskiy
2017-11-03 10:55 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

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=20171107022553.GB18521@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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.