qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 407bc1: savevm: create snapshot failed when i


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 407bc1: savevm: create snapshot failed when id_str already...
Date: Tue, 28 Apr 2015 11:00:12 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 407bc15033b2a8faeb7ca42aab63b7bcede76e10
      
https://github.com/qemu/qemu/commit/407bc15033b2a8faeb7ca42aab63b7bcede76e10
  Author: Yi Wang <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/qcow2-snapshot.c

  Log Message:
  -----------
  savevm: create snapshot failed when id_str already exists

The command "virsh create" will fail in such condition: vm has two
disks: vda and vdb. vda has snapshot s1 with id "1", vdb doesn't have
s1 but has snapshot s2 with id "1".  When we want to run command "virsh
create s1", del_existing_snapshots() only deletes s1 in vda, and
bdrv_snapshot_create() tries to create vdb's snapshot s1 with id "1",
but id "1" alreay exists in vdb with name "s2"!

The simplest way is call find_new_snapshot_id() unconditionally.

Signed-off-by: Yi Wang <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ecdda9e03d73d2cc1c82c00cccc02f087741b6a5
      
https://github.com/qemu/qemu/commit/ecdda9e03d73d2cc1c82c00cccc02f087741b6a5
  Author: Alberto Garcia <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add myself as the maintainer of the Quorum driver

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 588ef9d411339012fc3c94bfad8911e9d0a517a2
      
https://github.com/qemu/qemu/commit/588ef9d411339012fc3c94bfad8911e9d0a517a2
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/bt/sdp.c

  Log Message:
  -----------
  bt-sdp: fix broken uuids power-of-2 calculation

The binary search in sdp_uuid_match() only works when the number of
elements to search is a power of two.

  lo = record->uuid;
  hi = record->uuids;
  while (hi >>= 1)
      if (lo[hi] <= val)
    lo += hi;

  return *lo == val;

I noticed that the record->uuids calculation in
sdp_service_record_build() was suspect:

  record->uuids = 1 << ffs(record->uuids - 1);

Unlike most ffs(val) - 1 users, the expression is ffs(val - 1)!

Actually ffs() is the wrong function to use for power-of-2.  Use
pow2ceil() to achieve the correct effect.  Now the record->uuid[] array
is sized correctly and the binary search in sdp_uuid_match() should
work.

I'm not sure how to run/test this code.

Cc: Andrzej Zaborowski <address@hidden>
Cc: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ad5f5fdca83cccd1a4c269b1fd8ba2fce8d1ba26
      
https://github.com/qemu/qemu/commit/ad5f5fdca83cccd1a4c269b1fd8ba2fce8d1ba26
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/arm/nseries.c

  Log Message:
  -----------
  hw/arm/nseries: convert ffs(3) to ctz32()

It is not clear from the code how a 0 parameter should be handled by the
hardware.  Keep the same behavior as ffs(0) - 1 == -1.

Cc: Andrzej Zaborowski <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5863d374a32c98a7adb4c5e49d62de3cdc16d2ea
      
https://github.com/qemu/qemu/commit/5863d374a32c98a7adb4c5e49d62de3cdc16d2ea
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/pci-host/uninorth.c

  Log Message:
  -----------
  uninorth: convert ffs(3) to ctz32()

It is not clear from the code how a 0 parameter should be handled by the
hardware.  Keep the same behavior as ffs(0) - 1 == -1.

Cc: Alexander Graf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 786a4ea82ec9c87e3a895cf41081029b285a5fe5
      
https://github.com/qemu/qemu/commit/786a4ea82ec9c87e3a895cf41081029b285a5fe5
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qed.c
    M block/rbd.c
    M block/sheepdog.c
    M hw/acpi/pcihp.c
    M hw/arm/pxa2xx_gpio.c
    M hw/arm/strongarm.c
    M hw/display/tc6393xb.c
    M hw/gpio/max7310.c
    M hw/gpio/zaurus.c
    M hw/pci-host/bonito.c
    M hw/pci/msi.c
    M hw/pci/pcie_aer.c
    M hw/pci/shpc.c
    M hw/pci/slotid_cap.c
    M hw/ppc/ppce500_spin.c
    M hw/scsi/megasas.c
    M include/hw/pci/pci.h
    M include/hw/pci/pcie_regs.h
    M target-ppc/cpu.h

  Log Message:
  -----------
  Convert (ffs(val) - 1) to ctz32(val)

This commit was generated mechanically by coccinelle from the following
semantic patch:

@@
expression val;
@@
- (ffs(val) - 1)
+ ctz32(val)

The call sites have been audited to ensure the ffs(0) - 1 == -1 case
never occurs (due to input validation, asserts, etc).  Therefore we
don't need to worry about the fact that ctz32(0) == 32.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bd2a88840e2496e29442f333c8fdd6491e831a35
      
https://github.com/qemu/qemu/commit/bd2a88840e2496e29442f333c8fdd6491e831a35
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/arm/omap1.c
    M hw/char/virtio-serial-bus.c
    M hw/gpio/omap_gpio.c
    M hw/i2c/omap_i2c.c
    M hw/intc/allwinner-a10-pic.c
    M kvm-all.c

  Log Message:
  -----------
  Convert ffs() != 0 callers to ctz32()

There are a number of ffs(3) callers that do roughly:

  bit = ffs(val);
  if (bit) {
      do_something(bit - 1);
  }

This pattern can be converted to ctz32() like this:

  zeroes = ctz32(val);
  if (zeroes != 32) {
      do_something(zeroes);
  }

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c9d933185181cb1cf81bc4c9e5c3a10a5934b017
      
https://github.com/qemu/qemu/commit/c9d933185181cb1cf81bc4c9e5c3a10a5934b017
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/sd/sd.c

  Log Message:
  -----------
  sd: convert sd_normal_command() ffs(3) call to ctz32()

ffs() cannot be replaced with ctz32() when the argument might be zero,
because ffs(0) returns 0 while ctz32(0) returns 32.

The ffs(3) call in sd_normal_command() is a special case though.  It can
be converted to ctz32() + 1 because the argument is never zero:

  if (!(req.arg >> 8) || (req.arg >> (ctz32(req.arg & ~0xff) + 1))) {
      ~~~~~~~~~~~~~~~
      ^--------------- req.arg cannot be zero

Cc: Markus Armbruster <address@hidden>
Cc: Peter Crosthwaite <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 41074f3d3ff0e9a3c6f638627c12ebbf6d757cea
      
https://github.com/qemu/qemu/commit/41074f3d3ff0e9a3c6f638627c12ebbf6d757cea
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/intc/omap_intc.c

  Log Message:
  -----------
  omap_intc: convert ffs(3) to ctz32() in omap_inth_sir_update()

Rewrite the loop using level &= level - 1 to clear the least significant
bit after each iteration.  This simplifies the loop and makes it easy to
replace ffs(3) with ctz32().

Cc: Peter Maydell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f450a85899585776ccd0913d2361dd8f82666e44
      
https://github.com/qemu/qemu/commit/f450a85899585776ccd0913d2361dd8f82666e44
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M include/sysemu/os-win32.h

  Log Message:
  -----------
  os-win32: drop ffs(3) prototype

The lack of ffs(3) in the MinGW headers is a hint that we shouldn't rely
on it.  MinGW 4.9.2 does not make it available for linking when QEMU's
./configure --enable-debug is used (release builds are fine though).

Now that all QEMU code has been switched to ctz32() there is no need for
ffs(3).

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8b6ee9aeb3f0508ed2a41381cde13bdb8707b7be
      
https://github.com/qemu/qemu/commit/8b6ee9aeb3f0508ed2a41381cde13bdb8707b7be
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  checkpatch: complain about ffs(3) calls

The ffs(3) family of functions is not portable.  MinGW doesn't always
provide the function.

Use ctz32() or ctz64() instead.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: de50a20a4cc368d241d67c600f8c0f667186a8b5
      
https://github.com/qemu/qemu/commit/de50a20a4cc368d241d67c600f8c0f667186a8b5
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Switch to host monotonic clock for IO throttling

Currently, throttle timers won't make any progress when VCPU is not
running, which would stall the request queue in utils, qtest, vm
suspending, and live migration, without special handling.

Block jobs are confusingly inconsistent between with and without
throttling: if user sets a bps limit, stops the vm, then start a block
job, the block job will not make any progress; in contrary, if user
unsets the bps limit, or if it's not set, the block job will run
normally.

After this patch, with the host clock, even if the VCPUs are stopped,
the throttle queues will be processed.

This patch also enables potential to add throttle to bdrv_drain_all.
Currently all requests are drained immediately. In other words whenever
it is called, IO throttling goes ineffective (examples: system reset,
migration and many block job operations.). This is a loophole that guest
could exploit. If we use the host clock, we can later just trust the
nested poll. This could be done on top.

Note that for qemu-iotests case 093, which uses qtest, we still keep vm
clock so the script can control the clock stepping in order to be
deterministic.

Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e98ab097092e54999f046e9efa1ca1dd52f0c9e5
      
https://github.com/qemu/qemu/commit/e98ab097092e54999f046e9efa1ca1dd52f0c9e5
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M aio-posix.c
    M async.c
    M include/block/aio.h

  Log Message:
  -----------
  aio-posix: move pollfds to thread-local storage

By using thread-local storage, aio_poll can stop using global data during
g_poll_ns.  This will make it possible to drop callbacks from rfifolock.

[Moved npfd = 0 assignment to end of walking_handlers region as
suggested by Paolo.  This resolves the assert(npfd == 0) assertion
failure in pollfds_cleanup().
--Stefan]

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 49110174f8835ec3d5ca7fc076ee1f51c18564fe
      
https://github.com/qemu/qemu/commit/49110174f8835ec3d5ca7fc076ee1f51c18564fe
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M aio-posix.c
    M aio-win32.c
    M include/block/aio.h

  Log Message:
  -----------
  AioContext: acquire/release AioContext during aio_poll

This is the first step in pushing down acquire/release, and will let
rfifolock drop the contention callback feature.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a0710f7995f914e3044e5899bd8ff6c43c62f916
      
https://github.com/qemu/qemu/commit/a0710f7995f914e3044e5899bd8ff6c43c62f916
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M async.c
    M iothread.c
    M tests/test-aio.c

  Log Message:
  -----------
  iothread: release iothread around aio_poll

This is the first step towards having fine-grained critical sections in
dataplane threads, which resolves lock ordering problems between
address_space_* functions (which need the BQL when doing MMIO, even
after we complete RCU-based dispatch) and the AioContext.

Because AioContext does not use contention callbacks anymore, the
unit test has to be changed.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0df89e8e6f62aea32a7302e73a86b7bfe5821018
      
https://github.com/qemu/qemu/commit/0df89e8e6f62aea32a7302e73a86b7bfe5821018
  Author: Kevin Wolf <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block-backend: Expose bdrv_write_zeroes()

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 690c7301600162421b928c7f26fd488fd8fa464e
      
https://github.com/qemu/qemu/commit/690c7301600162421b928c7f26fd488fd8fa464e
  Author: Kevin Wolf <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img convert: Rewrite copying logic

The implementation of qemu-img convert is (a) messy, (b) buggy, and
(c) less efficient than possible. The changes required to beat some
sense into it are massive enough that incremental changes would only
make my and the reviewers' life harder. So throw it away and reimplement
it from scratch.

Let me give some examples what I mean by messy, buggy and inefficient:

(a) The copying logic of qemu-img convert has two separate branches for
    compressed and normal target images, which roughly do the same -
    except for a little code that handles actual differences between
    compressed and uncompressed images, and much more code that
    implements just a different set of optimisations and bugs. This is
    unnecessary code duplication, and makes the code for compressed
    output (unsurprisingly) suffer from bitrot.

    The code for uncompressed ouput is run twice to count the the total
    length for the progress bar. In the first run it just takes a
    shortcut and runs only half the loop, and when it's done, it toggles
    a boolean, jumps out of the loop with a backwards goto and starts
    over. Works, but pretty is something different.

(b) Converting while keeping a backing file (-B option) is broken in
    several ways. This includes not writing to the image file if the
    input has zero clusters or data filled with zeros (ignoring that the
    backing file will be visible instead).

    It also doesn't correctly limit every iteration of the copy loop to
    sectors of the same status so that too many sectors may be copied to
    in the target image. For -B this gives an unexpected result, for
    other images it just does more work than necessary.

    Conversion with a compressed target completely ignores any target
    backing file.

(c) qemu-img convert skips reading and writing an area if it knows from
    metadata that copying isn't needed (except for the bug mentioned
    above that ignores a status change in some cases). It does, however,
    read from the source even if it knows that it will read zeros, and
    then search for non-zero bytes in the read buffer, if it's possible
    that a write might be needed.

This reimplementation of the copying core reorganises the code to remove
the duplication and have a much more obvious code flow, by essentially
splitting the copy iteration loop into three parts:

1. Find the number of contiguous sectors of the same status at the
   current offset (This can also be called in a separate loop before the
   copying loop in order to determine the total sectors for the progress
   bar.)

2. Read sectors. If the status implies that there is no data there to
   read (zero or unallocated cluster), don't do anything.

3. Write sectors depending on the status. If it's data, write it. If
   we want the backing file to be visible (with -B), don't write it. If
   it's zeroed, skip it if you can, otherwise use bdrv_write_zeroes() to
   optimise the write at least where possible.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: e4f587492331df0ac50bad6131ea273d527af796
      
https://github.com/qemu/qemu/commit/e4f587492331df0ac50bad6131ea273d527af796
  Author: Kevin Wolf <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    A tests/qemu-iotests/122
    A tests/qemu-iotests/122.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  qemu-iotests: Some qemu-img convert tests

This adds a regression test for some problems that the qemu-img convert
rewrite just fixed.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 8eedfbd4a50299f03b3630659c34ad1b01f69370
      
https://github.com/qemu/qemu/commit/8eedfbd4a50299f03b3630659c34ad1b01f69370
  Author: Kevin Wolf <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/blkdebug.c

  Log Message:
  -----------
  blkdebug: Add bdrv_truncate()

This is, amongst others, required for qemu-iotests 033 to run as
intended on VHDX, which uses explicit bdrv_truncate() calls to bs->file
when allocating new blocks.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: d1a126c53ddc563b7b731cee013e0362f7a5f22f
      
https://github.com/qemu/qemu/commit/d1a126c53ddc563b7b731cee013e0362f7a5f22f
  Author: Kevin Wolf <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  vhdx: Fix zero-fill iov length

Fix the length of the zero-fill for the back, which was accidentally
using the same value as for the front. This is caught by qemu-iotests
033.

For consistency, change the code for the front as well to use the length
stored in the iov (it is the same value, copied four lines above).

Signed-off-by: Kevin Wolf <address@hidden>
Acked-by: Jeff Cody <address@hidden>


  Commit: 1faa5bb73247339bf3d797433a9ade990ef0fb32
      
https://github.com/qemu/qemu/commit/1faa5bb73247339bf3d797433a9ade990ef0fb32
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M thread-pool.c

  Log Message:
  -----------
  thread-pool: clean up thread_pool_completion_bh()

This patch simplifies thread_pool_completion_bh().

The function first checks elem->state:

  if (elem->state != THREAD_DONE) {
      continue;
  }

It then goes on to check elem->state == THREAD_DONE although we already
know this must be the case.

The QLIST_REMOVE() is duplicated down both branches of an if-else
statement so that can be lifted out as well.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9eddd6a4b3b187ba50038800b6e4aeda4973b365
      
https://github.com/qemu/qemu/commit/9eddd6a4b3b187ba50038800b6e4aeda4973b365
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M scripts/qemu-gdb.py

  Log Message:
  -----------
  scripts: add 'qemu coroutine' command to qemu-gdb.py

The 'qemu coroutine <coroutine-address>' GDB command prints the
backtrace for a CoroutineUContext.  This is useful for peeking inside
yielded coroutines that are waiting for file descriptor events, timers,
etc.

For example:

  $ gdb tests/test-coroutine
  (gdb) b test_yield
  (gdb) r
  (gdb) b qemu_coroutine_enter
  (gdb) c
  (gdb) c
  Continuing.

  Breakpoint 2, qemu_coroutine_enter (co=0x555555c66520, opaque=0x0) at 
qemu-coroutine.c:103
  103   {
  (gdb) source scripts/qemu-gdb.py
  (gdb) qemu coroutine 0x555555c66520
  #0  0x000055555557a740 in qemu_coroutine_switch (from_=<optimized out>, 
to_=0x7ffff7f90a70, action=COROUTINE_YIELD) at coroutine-ucontext.c:177
  #1  0x0000555555566af9 in yield_5_times (opaque=0x7fffffffdbb7) at 
tests/test-coroutine.c:107
  #2  0x000055555557a7aa in coroutine_trampoline (i0=<optimized out>, 
i1=<optimized out>) at coroutine-ucontext.c:80
  #3  0x00007ffff08de000 in __start_context () at /lib64/libc.so.6

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e5e51dd3af6a0872dedce290ee41437b5aeed109
      
https://github.com/qemu/qemu/commit/e5e51dd3af6a0872dedce290ee41437b5aeed109
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/null.c
    M qapi/block-core.json

  Log Message:
  -----------
  block/null: Latency simulation by adding new option "latency-ns"

Aio context switch should just work because the requests will be
drained, so the scheduled timer(s) on the old context will be freed.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1c2b49a17282f3abd9ccf71b65d0be62d3b3192e
      
https://github.com/qemu/qemu/commit/1c2b49a17282f3abd9ccf71b65d0be62d3b3192e
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/null.c

  Log Message:
  -----------
  block/null: Support reopen

Reopen is used in block-commit. With this always-succeed operation, it
is now possible to test committing to a null drive, by specifying
"null-aio://" or "null-co://" as the backing image when creating the
qcow2 image.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 199667a8c843d268f0fe80f09041b8c7193f1ba5
      
https://github.com/qemu/qemu/commit/199667a8c843d268f0fe80f09041b8c7193f1ba5
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add Fam Zheng as Null block driver maintainer

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 751ebd76e654bd1e65da08ecf694325282b4cfcc
      
https://github.com/qemu/qemu/commit/751ebd76e654bd1e65da08ecf694325282b4cfcc
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/mirror.c
    M blockdev.c
    M blockjob.c
    M include/block/blockjob.h

  Log Message:
  -----------
  blockjob: Allow nested pause

This patch changes block_job_pause to increase the pause counter and
block_job_resume to decrease it.

The counter will allow calling block_job_pause/block_job_resume
unconditionally on a job when we need to suspend the IO temporarily.

>From now on, each block_job_resume must be paired with a block_job_pause
to keep the counter balanced.

The user pause from QMP or HMP will only trigger block_job_pause once
until it's resumed, this is achieved by adding a user_paused flag in
BlockJob.

One occurrence of block_job_resume in mirror_complete is replaced with
block_job_enter which does what is necessary.

In block_job_cancel, the cancel flag is good enough to instruct
coroutines to quit loop, so use block_job_enter to replace the unpaired
block_job_resume.

Upon block job IO error, user is notified about the entering to the
pause state, so this pause belongs to user pause, set the flag
accordingly and expect a matching QMP resume.

[Extended doc comments as suggested by Paolo Bonzini
<address@hidden>.
--Stefan]

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 69da3b0b47c8f6016e9109fcfa608e9e7e99bc05
      
https://github.com/qemu/qemu/commit/69da3b0b47c8f6016e9109fcfa608e9e7e99bc05
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Pause block jobs in bdrv_drain_all

This is necessary to suppress more IO requests from being generated from
block job coroutines.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e62303a437af72141c8d04c36799521a56d6f4f6
      
https://github.com/qemu/qemu/commit/e62303a437af72141c8d04c36799521a56d6f4f6
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    A tests/qemu-iotests/129
    A tests/qemu-iotests/129.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  qemu-iotests: Test that "stop" doesn't drain block jobs

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a7282330c01364ef00260749bc6a37c7f16ec047
      
https://github.com/qemu/qemu/commit/a7282330c01364ef00260749bc6a37c7f16ec047
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/backup.c
    M block/mirror.c

  Log Message:
  -----------
  blockjob: Update function name in comments

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0b5a24454fc551f0294fe93821e8c643214a55f5
      
https://github.com/qemu/qemu/commit/0b5a24454fc551f0294fe93821e8c643214a55f5
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: avoid unnecessary bottom halves

bdrv_aio_* APIs can use coroutines to achieve asynchronicity.  However,
the coroutine may terminate without having yielded back to the caller
(for example because of something that invokes a nested event loop,
or because the coroutine is doing nothing at all).  In this case,
the bdrv_aio_* API must delay the completion to the next iteration
of the main loop, because bdrv_aio_* will never invoke the callback
before returning.

This can be done with a bottom half, and indeed bdrv_aio_* is always
using one for simplicity.  It is possible to gain some performance
(~3%) by avoiding this in the common case.  A new field in the
BlockAIOCBCoroutine struct is set to true until the first time the
corotine has yielded to its creator, and completion goes through a
new function bdrv_co_complete.  If the flag is false, bdrv_co_complete
invokes the callback immediately.  If it is true, the caller will
notice that the coroutine has completed and schedule the bottom
half itself.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4eb867e98c1815d9d7a2a9380182005df12064a7
      
https://github.com/qemu/qemu/commit/4eb867e98c1815d9d7a2a9380182005df12064a7
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M include/standard-headers/linux/virtio_blk.h

  Log Message:
  -----------
  virtio_blk: comment fix

update virtio blk header from latest linux, include comment fixups.

Signed-off-by: Michael S. Tsirkin <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d07063e46047242c4f010ff9ddbff5e02f15d9e7
      
https://github.com/qemu/qemu/commit/d07063e46047242c4f010ff9ddbff5e02f15d9e7
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/block/m25p80.c

  Log Message:
  -----------
  m25p80: add missing blk_attach_dev_nofail

Of the block devices that poked into -drive options via drive_get_next,
m25p80 was the only one who also did not attach itself to the BlockBackend.

Since sd does it, and all other devices go through a "drive" property,
with this change all block backends attached to the guest will have a
non-NULL result for blk_get_attached_dev().

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c485cf9c9277ca9b3d5227c99a13c374e812f42b
      
https://github.com/qemu/qemu/commit/c485cf9c9277ca9b3d5227c99a13c374e812f42b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/block/m25p80.c

  Log Message:
  -----------
  m25p80: fix s->blk usage before assignment

Delay the call to blk_blockalign() until s->blk has been assigned.

This never caused a crash because blk_blockalign(NULL, size) defaults to
4096 alignment but it's technically incorrect.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ec683d604069dcdaaa516789274bc0cdc14e5247
      
https://github.com/qemu/qemu/commit/ec683d604069dcdaaa516789274bc0cdc14e5247
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M qmp-commands.hx

  Log Message:
  -----------
  block: document block-stream in qmp-commands.hx

The 'block-stream' QMP command is documented in block-core.json but not
qmp-commands.hx.  Add a summary of the command to qmp-commands.hx
(similar to the documentation for 'block-commit').

Reported-by: Kashyap Chamarthy <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9b2aa84f87f5b95cb0295dcae38fbfbf115df2be
      
https://github.com/qemu/qemu/commit/9b2aa84f87f5b95cb0295dcae38fbfbf115df2be
  Author: Alberto Garcia <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/quorum.c
    M include/block/block.h

  Log Message:
  -----------
  block: add bdrv_get_device_or_node_name()

This function gets the device name associated with a BlockDriverState,
or its node name if the device name is empty.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 81e5f78a9f4f13548ec1edddaf780d339f18e2d2
      
https://github.com/qemu/qemu/commit/81e5f78a9f4f13548ec1edddaf780d339f18e2d2
  Author: Alberto Garcia <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/snapshot.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockdev.c
    M include/qapi/qmp/qerror.h

  Log Message:
  -----------
  block: use bdrv_get_device_or_node_name() in error messages

There are several error messages that identify a BlockDriverState by
its device name. However those errors can be produced in nodes that
don't have a device name associated.

In those cases we should use bdrv_get_device_or_node_name() to fall
back to the node name and produce a more meaningful message. The
messages are also updated to use the more generic term 'node' instead
of 'device'.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dc881b441d74b8fc6c9c007cd03d5d05bca388dd
      
https://github.com/qemu/qemu/commit/dc881b441d74b8fc6c9c007cd03d5d05bca388dd
  Author: Alberto Garcia <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/qcow2.c
    M docs/qmp/qmp-events.txt
    M qapi/block-core.json

  Log Message:
  -----------
  block: add 'node-name' field to BLOCK_IMAGE_CORRUPTED

Since this event can occur in nodes that cannot have a device name
associated, include also a field with the node name.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9419874f709469de16c1bced7731bfecb07fe1cf
      
https://github.com/qemu/qemu/commit/9419874f709469de16c1bced7731bfecb07fe1cf
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hmp.c

  Log Message:
  -----------
  Revert "hmp: fix crash in 'info block -n -v'"

This reverts commit 638b8366200130cc7cf7a026630bc6bfb63b0c4c.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee
      
https://github.com/qemu/qemu/commit/d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee
  Author: Alberto Garcia <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/qapi.c
    M blockdev.c
    M include/block/block.h
    M include/block/qapi.h

  Log Message:
  -----------
  qmp: fill in the image field in BlockDeviceInfo

The image field in BlockDeviceInfo is supposed to contain an ImageInfo
object. However that is being filled in by bdrv_query_info(), not by
bdrv_block_device_info(), which is where BlockDeviceInfo is actually
created.

Anyone calling bdrv_block_device_info() directly will get a null image
field. As a consequence of this, the HMP command 'info block -n -v'
crashes QEMU.

This patch moves the code that fills in that field from
bdrv_query_info() to bdrv_block_device_info().

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 20474e9aa040b9a255c63127f1eb873c29c54f68
      
https://github.com/qemu/qemu/commit/20474e9aa040b9a255c63127f1eb873c29c54f68
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: do not forget to logout from target

We actually were always impolitely dropping the connection and
not cleanly logging out.

CC: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0a386e48527d16e5dedbc1ff62aa0042a1cbdac5
      
https://github.com/qemu/qemu/commit/0a386e48527d16e5dedbc1ff62aa0042a1cbdac5
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: change all iscsilun properties from uint8_t to bool

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7191f2080c70228c6483b6604cc1c18943d8d766
      
https://github.com/qemu/qemu/commit/7191f2080c70228c6483b6604cc1c18943d8d766
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: rename iscsi_write_protected and let it return void

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 752ce45150d3d70aabc4eb46a7a9cdfd8b4640fd
      
https://github.com/qemu/qemu/commit/752ce45150d3d70aabc4eb46a7a9cdfd8b4640fd
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: store DPOFUA bit from the modesense command

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 73b5394e2e4af3bbe01e221fa395373facc67f78
      
https://github.com/qemu/qemu/commit/73b5394e2e4af3bbe01e221fa395373facc67f78
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: optimize WRITE10/16 if cache.writeback is not set

SCSI allowes to tell the target to not return from a write command
if the date is not written to the disk. Use this so called FUA
bit if it is supported to optimize WRITE commands if writeback is
not allowed.

In this case qemu always issues a WRITE followed by a FLUSH. This
is 2 round trip times. If we set the FUA bit we can ignore the
following FLUSH.

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 59dd0a22ca4c3ac70c37263208b9e49cfeacf2e4
      
https://github.com/qemu/qemu/commit/59dd0a22ca4c3ac70c37263208b9e49cfeacf2e4
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: increase retry count

The idea is that a command is retried in a BUSY condition
up a time of approx. 60 seconds before it is failed. This should
be far higher than any command timeout in the guest.

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e380aff831c24b37c023010852e7ddd2ae1ec385
      
https://github.com/qemu/qemu/commit/e380aff831c24b37c023010852e7ddd2ae1ec385
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: handle SCSI_STATUS_TASK_SET_FULL

a target may issue a SCSI_STATUS_TASK_SET_FULL status
if there is more than one "BUSY" command queued already.

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 03e40fef4678f9a42846c91a804b6d3c820e8b90
      
https://github.com/qemu/qemu/commit/03e40fef4678f9a42846c91a804b6d3c820e8b90
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: bump year in copyright notice

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9eac3622a2b1159ab50b10540e822f3e58fdc383
      
https://github.com/qemu/qemu/commit/9eac3622a2b1159ab50b10540e822f3e58fdc383
  Author: Peter Lieven <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: use the allocationmap also if cache.direct=on

the allocationmap has only a hint character. The driver always
double checks that blocks marked unallocated in the cache are
still unallocated before taking the fast path and return zeroes.
So using the allocationmap is migration safe and can
also be enabled with cache.direct=on.

Signed-off-by: Peter Lieven <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: efcfa278dca27f1c9db8b8283eac54f5e19074e7
      
https://github.com/qemu/qemu/commit/efcfa278dca27f1c9db8b8283eac54f5e19074e7
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    A docs/bitmaps.md

  Log Message:
  -----------
  docs: incremental backup documentation

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0db6e54a8a2c6e16780356422da671b71f862341
      
https://github.com/qemu/qemu/commit/0db6e54a8a2c6e16780356422da671b71f862341
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/mirror.c
    M include/block/block.h
    M migration/block.c
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: Add optional field "name" to block dirty bitmap

This field will be set for user created dirty bitmap. Also pass in an
error pointer to bdrv_create_dirty_bitmap, so when a name is already
taken on this BDS, it can report an error message. This is not global
check, two BDSes can have dirty bitmap with a common name.

Implemented bdrv_find_dirty_bitmap to find a dirty bitmap by name, will
be used later when other QMP commands want to reference dirty bitmap by
name.

Add bdrv_dirty_bitmap_make_anon. This unsets the name of dirty bitmap.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5fba6c0e50b66691568b34d5a2f4be0b39f5e20a
      
https://github.com/qemu/qemu/commit/5fba6c0e50b66691568b34d5a2f4be0b39f5e20a
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/mirror.c
    M include/block/block.h
    M include/block/block_int.h
    M qapi/block-core.json

  Log Message:
  -----------
  qmp: Ensure consistent granularity type

We treat this field with a variety of different types everywhere
in the code. Now it's just uint32_t.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 341ebc2f81b14862347e4d4c1fcb3759f815237a
      
https://github.com/qemu/qemu/commit/341ebc2f81b14862347e4d4c1fcb3759f815237a
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/mirror.c
    M blockdev.c
    M include/block/block.h
    M qapi/block-core.json
    M qmp-commands.hx

  Log Message:
  -----------
  qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

The new command pair is added to manage a user created dirty bitmap. The
dirty bitmap's name is mandatory and must be unique for the same device,
but different devices can have bitmaps with the same names.

The granularity is an optional field. If it is not specified, we will
choose a default granularity based on the cluster size if available,
clamped to between 4K and 64K to mirror how the 'mirror' code was
already choosing granularity. If we do not have cluster size info
available, we choose 64K. This code has been factored out into a helper
shared with block/mirror.

This patch also introduces the 'block_dirty_bitmap_lookup' helper,
which takes a device name and a dirty bitmap name and validates the
lookup, returning NULL and setting errp if there is a problem with
either field. This helper will be re-used in future patches in this
series.

The types added to block-core.json will be re-used in future patches
in this series, see:
'qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}'

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 592fdd02ae987a439a2ba25a2a973673f1484805
      
https://github.com/qemu/qemu/commit/592fdd02ae987a439a2ba25a2a973673f1484805
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M include/block/block.h

  Log Message:
  -----------
  block: Introduce bdrv_dirty_bitmap_granularity()

This returns the granularity (in bytes) of dirty bitmap,
which matches the QMP interface and the existing query
interface.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8515efbef1759b9143f06e9722c8f4e145032181
      
https://github.com/qemu/qemu/commit/8515efbef1759b9143f06e9722c8f4e145032181
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M util/hbitmap.c

  Log Message:
  -----------
  hbitmap: cache array lengths

As a convenience: between incremental backups, bitmap migrations
and bitmap persistence we seem to need to recalculate these a lot.

Because the lengths are a little bit-twiddly, let's just solidly
cache them and be done with it.

Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: be58721dbf882fa8830f3669f499b0a5b501e90f
      
https://github.com/qemu/qemu/commit/be58721dbf882fa8830f3669f499b0a5b501e90f
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M include/qemu/hbitmap.h
    M util/hbitmap.c

  Log Message:
  -----------
  hbitmap: add hbitmap_merge

We add a bitmap merge operation to assist in error cases
where we wish to combine two bitmaps together.

This is algorithmically O(bits) provided HBITMAP_LEVELS remains
constant. For a full bitmap on a 64bit machine:
sum(bits/64^k, k, 0, HBITMAP_LEVELS) ~= 1.01587 * bits

We may be able to improve running speed for particularly sparse
bitmaps by using iterators, but the running time for dense maps
will be worse.

We present the simpler solution first, and we can refine it later
if needed.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b8e6fb752e43b45b428487c244cab35f0ab94b10
      
https://github.com/qemu/qemu/commit/b8e6fb752e43b45b428487c244cab35f0ab94b10
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M include/block/block.h

  Log Message:
  -----------
  block: Add bitmap disabled status

Add a status indicating the enabled/disabled state of the bitmap.
A bitmap is by default enabled, but you can lock the bitmap into
a read-only state by setting disabled = true.

A previous version of this patch added a QMP interface for changing
the state of the bitmap, but it has since been removed for now until
a use case emerges where this state must be revealed to the user.

The disabled state WILL be used internally for bitmap migration and
bitmap persistence.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9bd2b08f27b9c27bb40d73b6466321b8c635086e
      
https://github.com/qemu/qemu/commit/9bd2b08f27b9c27bb40d73b6466321b8c635086e
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M blockdev.c
    M include/block/block.h
    M qapi/block-core.json

  Log Message:
  -----------
  block: Add bitmap successors

A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to
be created just prior to a sensitive operation (e.g. Incremental Backup)
that can either succeed or fail, but during the course of which we still
want a bitmap tracking writes.

On creating a successor, we "freeze" the parent bitmap which prevents
its deletion, enabling, anonymization, or creating a bitmap with the
same name.

On success, the parent bitmap can "abdicate" responsibility to the
successor, which will inherit its name. The successor will have been
tracking writes during the course of the backup operation. The parent
will be safely deleted.

On failure, we can "reclaim" the successor from the parent, unifying
them such that the resulting bitmap describes all writes occurring since
the last successful backup, for instance. Reclamation will thaw the
parent, but not explicitly re-enable it.

BdrvDirtyBitmap operations that target a single bitmap are protected
by assertions that the bitmap is not frozen and/or disabled.

BdrvDirtyBitmap operations that target a group of bitmaps, such as
bdrv_{set,reset}_dirty will ignore frozen/disabled drives with a
conditional instead.

Internal functions that enable/disable dirty bitmaps have assertions
added to them to prevent modifying frozen bitmaps.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d58d84539784d27c826924a79d9436178b07ff69
      
https://github.com/qemu/qemu/commit/d58d84539784d27c826924a79d9436178b07ff69
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/backup.c
    M block/mirror.c
    M blockdev.c
    M hmp.c
    M include/block/block.h
    M include/block/block_int.h
    M qapi/block-core.json
    M qmp-commands.hx

  Log Message:
  -----------
  qmp: Add support of "dirty-bitmap" sync mode for drive-backup

For "dirty-bitmap" sync mode, the block job will iterate through the
given dirty bitmap to decide if a sector needs backup (backup all the
dirty clusters and skip clean ones), just as allocation conditions of
"top" sync mode.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e74e6b78e6fe0c9ee426d1278fff45f5fa0af766
      
https://github.com/qemu/qemu/commit/e74e6b78e6fe0c9ee426d1278fff45f5fa0af766
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M blockdev.c
    M include/block/block.h
    M qapi/block-core.json
    M qmp-commands.hx

  Log Message:
  -----------
  qmp: add block-dirty-bitmap-clear

Add bdrv_clear_dirty_bitmap and a matching QMP command,
qmp_block_dirty_bitmap_clear that enables a user to reset
the bitmap attached to a drive.

This allows us to reset a bitmap in the event of a full
drive backup.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a113534ffb8f2580d323e6397e6908d5f4bfa0b7
      
https://github.com/qemu/qemu/commit/a113534ffb8f2580d323e6397e6908d5f4bfa0b7
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M qapi/block-core.json

  Log Message:
  -----------
  qmp: Add dirty bitmap status field in query-block

Add the "frozen" status booleans, to inform clients
when a bitmap is occupied doing a task.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: aa0c7ca506bb3f661be673b3d5c1320f37e52fdb
      
https://github.com/qemu/qemu/commit/aa0c7ca506bb3f661be673b3d5c1320f37e52fdb
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: add BdrvDirtyBitmap documentation

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 20dca81075e712ebcbc151eed9b1a02d4e5d08f5
      
https://github.com/qemu/qemu/commit/20dca81075e712ebcbc151eed9b1a02d4e5d08f5
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/backup.c
    M block/mirror.c
    M blockdev.c
    M include/block/block.h
    M migration/block.c

  Log Message:
  -----------
  block: Ensure consistent bitmap function prototypes

We often don't need the BlockDriverState for functions
that operate on bitmaps. Remove it.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ce1ffea8cdcea41533bde87759b8390f0e3a9ad3
      
https://github.com/qemu/qemu/commit/ce1ffea8cdcea41533bde87759b8390f0e3a9ad3
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M include/qemu/hbitmap.h
    M util/hbitmap.c

  Log Message:
  -----------
  block: Resize bitmaps on bdrv_truncate

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a94e87c08cfff73ac4b179adc3d0d9c3b8d2ddef
      
https://github.com/qemu/qemu/commit/a94e87c08cfff73ac4b179adc3d0d9c3b8d2ddef
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M tests/test-hbitmap.c

  Log Message:
  -----------
  hbitmap: truncate tests

The general approach is to set bits close to the boundaries of
where we are truncating and ensure that everything appears to
have gone OK.

We test growing and shrinking by different amounts:
- Less than the granularity
- Less than the granularity, but across a boundary
- Less than sizeof(unsigned long)
- Less than sizeof(unsigned long), but across a ulong boundary
- More than sizeof(unsigned long)

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9f7264f57c8307bca32e78427348b8b323d5db21
      
https://github.com/qemu/qemu/commit/9f7264f57c8307bca32e78427348b8b323d5db21
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    A tests/qemu-iotests/124
    A tests/qemu-iotests/124.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: add invalid input incremental backup tests

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7898f74e78a5900fc079868e255b65d807fa8a8f
      
https://github.com/qemu/qemu/commit/7898f74e78a5900fc079868e255b65d807fa8a8f
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M scripts/qmp/qmp.py
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: add QMP event waiting queue

A filter is added to allow callers to request very specific
events to be pulled from the event queue, while leaving undesired
events still in the stream.

This allows us to poll for completion data for multiple asynchronous
events in any arbitrary order.

A new timeout context is added to the qmp pull_event method's
wait parameter to allow tests to fail if they do not complete
within some expected period of time.

Also fixed is a bug in qmp.pull_event where we try to retrieve an event
from an empty list if we attempt to retrieve an event with wait=False
but no events have occurred.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a3d715958c4456afea402e891288864fe4e51547
      
https://github.com/qemu/qemu/commit/a3d715958c4456afea402e891288864fe4e51547
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

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

  Log Message:
  -----------
  iotests: add simple incremental backup case

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 24618f5381da650bd50c78feea07b35cf82e7d6c
      
https://github.com/qemu/qemu/commit/24618f5381da650bd50c78feea07b35cf82e7d6c
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

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

  Log Message:
  -----------
  iotests: add incremental backup failure recovery test

Test the failure case for incremental backups.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 59fc5d844fe192494308d0f07507b712ec395129
      
https://github.com/qemu/qemu/commit/59fc5d844fe192494308d0f07507b712ec395129
  Author: John Snow <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

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

  Log Message:
  -----------
  iotests: add incremental backup granularity tests

Test what happens if you fiddle with the granularity.

Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 001c95b740b2ed3d8b486952f68b5f06e609f1f2
      
https://github.com/qemu/qemu/commit/001c95b740b2ed3d8b486952f68b5f06e609f1f2
  Author: Max Reitz <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Always call block_job_sleep_ns()

The mirror block job is trying to take a clever shortcut if delay_ns is
0 and skips block_job_sleep_ns() in that case. But that function must be
called in every block job iteration, because otherwise it is for example
impossible to pause the job.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5505e8b76f86f925c35ecc2b2d311886bb36534c
      
https://github.com/qemu/qemu/commit/5505e8b76f86f925c35ecc2b2d311886bb36534c
  Author: Michael Tokarev <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/Makefile.objs

  Log Message:
  -----------
  block/dmg: make it modular

dmg can optionally utilize libbz2, make it modular

Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7237aecd7e8fcc3ccf7fded77b6c127b4df5d3ac
      
https://github.com/qemu/qemu/commit/7237aecd7e8fcc3ccf7fded77b6c127b4df5d3ac
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Widen before shifting 32 bit header field

Coverity spotted this.

The field is 32 bits, but if it's possible to overflow in 32 bit
left shift.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4f5472cb2d3d37ec3282cc3829612f9d696c2df7
      
https://github.com/qemu/qemu/commit/4f5472cb2d3d37ec3282cc3829612f9d696c2df7
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: replace bdrv_states iteration with bdrv_next()

The bdrv_states list is a static variable in block.c.

bdrv_drain_all() and bdrv_flush_all() use this variable to iterate over
all drives.

The next patch will move bdrv_drain_all() and bdrv_flush_all() out of
block.c so it's necessary to switch to the public bdrv_next() interface.

Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e0c47b6cb1de430fbc6f828f7acffa851c580840
      
https://github.com/qemu/qemu/commit/e0c47b6cb1de430fbc6f828f7acffa851c580840
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h

The dirty bitmap functions are called from the block I/O processing
code.  Make them visible to block_int.h users so they can be used
outside block.c.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0eb7217e49b84553bb30f97bc34380633fd846fe
      
https://github.com/qemu/qemu/commit/0eb7217e49b84553bb30f97bc34380633fd846fe
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: extract bdrv_setup_io_funcs()

Move the code to install coroutine and aio emulation function pointers
in a BlockDriver to its own function.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 61007b316cd71ee7333ff7a0a749a8949527575f
      
https://github.com/qemu/qemu/commit/61007b316cd71ee7333ff7a0a749a8949527575f
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M block.c
    M block/Makefile.objs
    A block/io.c

  Log Message:
  -----------
  block: move I/O request processing to block/io.c

The block.c file has grown to over 6000 lines.  It is time to split this
file so there are fewer conflicts and the code is easier to maintain.

Extract I/O request processing code:
 * Read
 * Write
 * Zero writes and making the image empty
 * Flush
 * Discard
 * ioctl
 * Tracked requests and queuing
 * Throttling and copy-on-read
 * Block status and allocated functions
 * Refreshing block limits
 * Reading/writing vmstate
 * qemu_blockalign() and friends

The patch simply moves code from block.c into block/io.c.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a9392bc93c8615ad1983047e9f91ee3fa8aae75f
      
https://github.com/qemu/qemu/commit/a9392bc93c8615ad1983047e9f91ee3fa8aae75f
  Author: Peter Maydell <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M MAINTAINERS
    M aio-posix.c
    M aio-win32.c
    M async.c
    M block.c
    M block/Makefile.objs
    M block/backup.c
    M block/blkdebug.c
    M block/block-backend.c
    A block/io.c
    M block/iscsi.c
    M block/mirror.c
    M block/null.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/rbd.c
    M block/sheepdog.c
    M block/snapshot.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockdev.c
    M blockjob.c
    A docs/bitmaps.md
    M docs/qmp/qmp-events.txt
    M hmp.c
    M hw/acpi/pcihp.c
    M hw/arm/nseries.c
    M hw/arm/omap1.c
    M hw/arm/pxa2xx_gpio.c
    M hw/arm/strongarm.c
    M hw/block/m25p80.c
    M hw/bt/sdp.c
    M hw/char/virtio-serial-bus.c
    M hw/display/tc6393xb.c
    M hw/gpio/max7310.c
    M hw/gpio/omap_gpio.c
    M hw/gpio/zaurus.c
    M hw/i2c/omap_i2c.c
    M hw/intc/allwinner-a10-pic.c
    M hw/intc/omap_intc.c
    M hw/pci-host/bonito.c
    M hw/pci-host/uninorth.c
    M hw/pci/msi.c
    M hw/pci/pcie_aer.c
    M hw/pci/shpc.c
    M hw/pci/slotid_cap.c
    M hw/ppc/ppce500_spin.c
    M hw/scsi/megasas.c
    M hw/sd/sd.c
    M include/block/aio.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/blockjob.h
    M include/block/qapi.h
    M include/hw/pci/pci.h
    M include/hw/pci/pcie_regs.h
    M include/qapi/qmp/qerror.h
    M include/qemu/hbitmap.h
    M include/standard-headers/linux/virtio_blk.h
    M include/sysemu/block-backend.h
    M include/sysemu/os-win32.h
    M iothread.c
    M kvm-all.c
    M migration/block.c
    M qapi/block-core.json
    M qemu-img.c
    M qmp-commands.hx
    M scripts/checkpatch.pl
    M scripts/qemu-gdb.py
    M scripts/qmp/qmp.py
    M target-ppc/cpu.h
    A tests/qemu-iotests/122
    A tests/qemu-iotests/122.out
    A tests/qemu-iotests/124
    A tests/qemu-iotests/124.out
    A tests/qemu-iotests/129
    A tests/qemu-iotests/129.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py
    M tests/test-aio.c
    M tests/test-hbitmap.c
    M thread-pool.c
    M util/hbitmap.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block patches

# gpg: Signature made Tue Apr 28 15:35:05 2015 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (76 commits)
  block: move I/O request processing to block/io.c
  block: extract bdrv_setup_io_funcs()
  block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h
  block: replace bdrv_states iteration with bdrv_next()
  vmdk: Widen before shifting 32 bit header field
  block/dmg: make it modular
  block/mirror: Always call block_job_sleep_ns()
  iotests: add incremental backup granularity tests
  iotests: add incremental backup failure recovery test
  iotests: add simple incremental backup case
  iotests: add QMP event waiting queue
  iotests: add invalid input incremental backup tests
  hbitmap: truncate tests
  block: Resize bitmaps on bdrv_truncate
  block: Ensure consistent bitmap function prototypes
  block: add BdrvDirtyBitmap documentation
  qmp: Add dirty bitmap status field in query-block
  qmp: add block-dirty-bitmap-clear
  qmp: Add support of "dirty-bitmap" sync mode for drive-backup
  block: Add bitmap successors
  ...

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


Compare: https://github.com/qemu/qemu/compare/84cbd63f87c1...a9392bc93c86

reply via email to

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