qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c232bf: migration: Report when bdrv_inactivat


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c232bf: migration: Report when bdrv_inactivate_all fails
Date: Thu, 07 Sep 2017 08:38:50 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c232bf58cb1169f1bd80c519e2cc4218e525a556
      
https://github.com/qemu/qemu/commit/c232bf58cb1169f1bd80c519e2cc4218e525a556
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Report when bdrv_inactivate_all fails

If the bdrv_inactivate_all fails near the end of the migration,
the migration will fail and often the only diagnostics in the log
are an I/O error which you can't distinguish from an error on
the socket connection.

Add an error so we know when it's actually a block problem.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d0834eb5393501fe8efe350db4dc638f23a218ff
      
https://github.com/qemu/qemu/commit/d0834eb5393501fe8efe350db4dc638f23a218ff
  Author: Markus Armbruster <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M migration/page_cache.c
    M migration/page_cache.h

  Log Message:
  -----------
  xbzrle: Drop unused cache_resize()

Unused since commit fd8cec XBZRLE: Fix qemu crash when resize the
xbzrle cache.

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


  Commit: 43c64a093dbe8bffa4eb774685dee535bdffaffb
      
https://github.com/qemu/qemu/commit/43c64a093dbe8bffa4eb774685dee535bdffaffb
  Author: Markus Armbruster <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M include/qemu/host-utils.h

  Log Message:
  -----------
  host-utils: Proactively fix pow2floor(), switch to unsigned

The function's stated contract is simple enough: "round down to the
nearest power of 2".  Suggests the domain is the representable numbers
>= 1, because that's the smallest power of two.

The implementation doesn't check for domain errors, but returns
garbage instead:

* For negative arguments, pow2floor() returns -2^63, which is not even
  a power of two, let alone the nearest one.

  What sort of works is passing *unsigned* arguments >= 2^63.  The
  implicit conversion to signed is implementation defined, but
  commonly yields the (negative) two's complement.  pow2floor() then
  returns -2^63.  Callers that convert that back to unsigned get the
  correct value 2^63.

* For a zero argument, pow2floor() shifts right by 64.  Undefined
  behavior.  Common actual behavior is to shift by 0, yielding -2^63.

Fix by switching from int64_t to uint64_t and amending the contract to
map zero to zero.

Callers are fine with that:

* memory_access_size()

  This function makes no sense unless the argument is positive and the
  return value fits into int.

* raw_refresh_limits()

  Passes an int between 1 and BDRV_REQUEST_MAX_BYTES.

* iscsi_refresh_limits()

  Passes an integer between 0 and INT_MAX, converts the result to
  uint32_t.  Passing zero would be undefined behavior, but commonly
  yield zero.  The patch gives us the zero without the undefined
  behavior.

* cache_init()

  Passes a positive int64_t argument.

* xbzrle_cache_resize()

  Passes a positive int64_t argument (>= TARGET_PAGE_SIZE, actually).

* spapr_node0_size()

  Passes a positive uint64_t argument, and converts the result to
  hwaddr, i.e. uint64_t.

* spapr_populate_memory()

  Passes a positive hwaddr argument, and converts the result to
  hwaddr.

Cc: Juan Quintela <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 362aaf14576d2bc3f0117b87cfb595d48cda3d64
      
https://github.com/qemu/qemu/commit/362aaf14576d2bc3f0117b87cfb595d48cda3d64
  Author: Markus Armbruster <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M include/qemu/host-utils.h

  Log Message:
  -----------
  host-utils: Simplify pow2ceil()

Cc: Radim Krčmář <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 505d786f8f627ec5eccfee79a6a8f3a0e0bc3fa2
      
https://github.com/qemu/qemu/commit/505d786f8f627ec5eccfee79a6a8f3a0e0bc3fa2
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  runstate/migrate: Two more transitions

There's a race if someone does a 'stop' near the end of migrate;
the migration process goes through two runstates:
    'finish migrate'
    'postmigrate'

If the user issues a 'stop' between the two we end up with invalid
state transitions.
Add the transitions as valid.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 5089e1862fe80b6f23ba4c494e2902cbe3d9d48e
      
https://github.com/qemu/qemu/commit/5089e1862fe80b6f23ba4c494e2902cbe3d9d48e
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Reset rather than destroy main_thread_load_event

migration_incoming_state_destroy doesn't really destroy, it cleans up.
After a loadvm it's called, but the loadvm command can be run twice,
and so destroying an init-once mutex breaks on the second loadvm.

Reported-by: Stafford Horne <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Tested-by: Stafford Horne <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 04583a9e8fbeb2c5c0607327b853b306aef7465f
      
https://github.com/qemu/qemu/commit/04583a9e8fbeb2c5c0607327b853b306aef7465f
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M tests/qemu-iotests/068
    M tests/qemu-iotests/068.out

  Log Message:
  -----------
  snapshot/tests: Try loadvm twice

It's legal to loadvm twice, modify the existing save/loadvm test
to do it twice.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: a31fedeed764ce0b0d6097d4334c5770e74641a0
      
https://github.com/qemu/qemu/commit/a31fedeed764ce0b0d6097d4334c5770e74641a0
  Author: Peter Xu <address@hidden>
  Date:   2017-09-06 (Wed, 06 Sep 2017)

  Changed paths:
    M migration/migration.c
    M migration/trace-events

  Log Message:
  -----------
  migration: dump str in migrate_set_state trace

Strings are more readable for debugging.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
  Fixed up merge with 977c73


  Commit: 7794b34e63fd42803e959c4989e5358f2412d325
      
https://github.com/qemu/qemu/commit/7794b34e63fd42803e959c4989e5358f2412d325
  Author: Peter Maydell <address@hidden>
  Date:   2017-09-07 (Thu, 07 Sep 2017)

  Changed paths:
    M include/qemu/host-utils.h
    M migration/migration.c
    M migration/page_cache.c
    M migration/page_cache.h
    M migration/savevm.c
    M migration/trace-events
    M tests/qemu-iotests/068
    M tests/qemu-iotests/068.out
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20170906a' 
into staging

migration pull 2017-09-06

# gpg: Signature made Wed 06 Sep 2017 19:39:23 BST
# gpg:                using RSA key 0x0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20170906a:
  migration: dump str in migrate_set_state trace
  snapshot/tests: Try loadvm twice
  migration: Reset rather than destroy main_thread_load_event
  runstate/migrate: Two more transitions
  host-utils: Simplify pow2ceil()
  host-utils: Proactively fix pow2floor(), switch to unsigned
  xbzrle: Drop unused cache_resize()
  migration: Report when bdrv_inactivate_all fails

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


Compare: https://github.com/qemu/qemu/compare/7e375e04422b...7794b34e63fd

reply via email to

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