qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 17b74b: migration: Move qjson.[ch] to migrati


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 17b74b: migration: Move qjson.[ch] to migration/
Date: Tue, 24 May 2016 05:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 17b74b98676aee5bc470b173b1e528d2fce2cf18
      
https://github.com/qemu/qemu/commit/17b74b98676aee5bc470b173b1e528d2fce2cf18
  Author: Markus Armbruster <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M Makefile.objs
    A include/migration/qjson.h
    M include/migration/vmstate.h
    R include/qjson.h
    M migration/Makefile.objs
    A migration/qjson.c
    M migration/vmstate.c
    R qjson.c
    M tests/Makefile

  Log Message:
  -----------
  migration: Move qjson.[ch] to migration/

Type QJSON lets you build JSON text.  Its interface mirrors (a subset
of) abstract JSON syntax.

QAPI output visitors also produce JSON text.  They assert their
preconditions and invariants, and therefore abort on incorrect use.

Contrastingly, QJSON does *not* detect incorrect use.  It happily
produces invalid JSON then.  This is what migration wants.

QJSON was designed for migration, and migration is its only user.
Move it to migration/ for proper coverage by MAINTAINERS, and to deter
accidental use outside migration.

[Pointed out by Eric: QJSON was added in commits 0457d07..b174257
 -- Amit]

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: b72fe9e690db5082fdd0476074230cf2c65508bf
      
https://github.com/qemu/qemu/commit/b72fe9e690db5082fdd0476074230cf2c65508bf
  Author: Markus Armbruster <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M include/migration/qjson.h
    M migration/qjson.c
    M migration/savevm.c

  Log Message:
  -----------
  migration/qjson: Drop gratuitous use of QOM

All the use of QOM buys us here is the ability to destroy the thing
with object_unref(OBJECT(vmdesc)).  Not worth the notational overhead.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: d85a31d1f4d45462b7ca333190b5d14fad982f3e
      
https://github.com/qemu/qemu/commit/d85a31d1f4d45462b7ca333190b5d14fad982f3e
  Author: Jason J. Herne <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M hmp.c
    M migration/migration.c
    M migration/ram.c
    M qapi-schema.json
    M qmp-commands.hx

  Log Message:
  -----------
  migration: Promote improved autoconverge commands out of experimental state

The new autoconverge throttling commands have been tested for a release now. It
is time to move them out of the experimental state.

Signed-off-by: Jason J. Herne <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 24f3902b088cd4f2dbebfd90527b5d81d6a050e9
      
https://github.com/qemu/qemu/commit/24f3902b088cd4f2dbebfd90527b5d81d6a050e9
  Author: Greg Kurz <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M include/migration/migration.h
    M migration/migration.c
    M migration/savevm.c

  Log Message:
  -----------
  savevm: fail if migration blockers are present

QEMU has currently two ways to prevent migration to occur:
- migration blocker when it depends on runtime state
- VMStateDescription.unmigratable when migration is not supported at all

This patch gathers all the logic into a single function to be called from
both the savevm and the migrate paths.

This fixes a bug with 9p, at least, where savevm would succeed and the
following would happen in the guest after loadvm:

$ ls /host
ls: cannot access /host: Protocol error

With this patch:

(qemu) savevm foo
Migration is disabled when VirtFS export path '/' is mounted in the guest
using mount_tag 'host'

Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>

[Update subject according to Paolo's suggestion - Amit]

Signed-off-by: Amit Shah <address@hidden>


  Commit: fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6
      
https://github.com/qemu/qemu/commit/fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6
  Author: Greg Kurz <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: regain control of images when migration fails to complete

We currently have an error path during migration that can cause
the source QEMU to abort:

migration_thread()
  migration_completion()
    runstate_is_running() ----------------> true if guest is running
    bdrv_inactivate_all() ----------------> inactivate images
    qemu_savevm_state_complete_precopy()
     ... qemu_fflush()
     socket_writev_buffer() --------> error because destination fails
   qemu_fflush() -------------------> set error on migration stream
  migration_completion() -----------------> set migrate state to FAILED
migration_thread() -----------------------> break migration loop
  vm_start() -----------------------------> restart guest with inactive
                                      images

and you get:

qemu-system-ppc64: socket_writev_buffer: Got err=104 for 
(32768/18446744073709551615)
qemu-system-ppc64: 
/home/greg/Work/qemu/qemu-master/block/io.c:1342:bdrv_co_do_pwritev: Assertion 
`!(bs->open_flags & 0x0800)' failed.
Aborted (core dumped)

If we try postcopy with a similar scenario, we also get the writev error
message but QEMU leaves the guest paused because entered_postcopy is true.

We could possibly do the same with precopy and leave the guest paused.
But since the historical default for migration errors is to restart the
source, this patch adds a call to bdrv_invalidate_cache_all() instead.

Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 99694362ee563c5bbfad92bcc6bd578c0d4f7ce7
      
https://github.com/qemu/qemu/commit/99694362ee563c5bbfad92bcc6bd578c0d4f7ce7
  Author: Peter Maydell <address@hidden>
  Date:   2016-05-24 (Tue, 24 May 2016)

  Changed paths:
    M Makefile.objs
    M hmp.c
    M include/migration/migration.h
    A include/migration/qjson.h
    M include/migration/vmstate.h
    R include/qjson.h
    M migration/Makefile.objs
    M migration/migration.c
    A migration/qjson.c
    M migration/ram.c
    M migration/savevm.c
    M migration/vmstate.c
    M qapi-schema.json
    R qjson.c
    M qmp-commands.hx
    M tests/Makefile

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/amit-migration/tags/migration-2.7-1' 
into staging

migration fixes:

- ensure src block devices continue fine after a failed migration
- fail on migration blockers; helps 9p savevm/loadvm
- move autoconverge commands out of experimental state
- move the migration-specific qjson in migration/

# gpg: Signature made Mon 23 May 2016 18:15:09 BST using RSA key ID 657EF670
# gpg: Good signature from "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"

* remotes/amit-migration/tags/migration-2.7-1:
  migration: regain control of images when migration fails to complete
  savevm: fail if migration blockers are present
  migration: Promote improved autoconverge commands out of experimental state
  migration/qjson: Drop gratuitous use of QOM
  migration: Move qjson.[ch] to migration/

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/b0f6ef891524...99694362ee56

reply via email to

[Prev in Thread] Current Thread [Next in Thread]