qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 90c786: block: Don't disable I/O throttling o


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 90c786: block: Don't disable I/O throttling on sync reques...
Date: Thu, 12 May 2016 09:30:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 90c78624f157ba41c3761c1a54864de03a7ec350
      
https://github.com/qemu/qemu/commit/90c78624f157ba41c3761c1a54864de03a7ec350
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Don't disable I/O throttling on sync requests

We had to disable I/O throttling with synchronous requests because we
didn't use to run timers in nested event loops when the code was
introduced. This isn't true any more, and throttling works just fine
even when using the synchronous API.

The removed code is in fact dead code since commit a8823a3b ('block: Use
blk_co_pwritev() for blk_write()') because I/O throttling can only be
set on the top layer, but BlockBackend always uses the coroutine
interface now instead of using the sync API emulation in block.c.

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


  Commit: 733bbc8ceaeeb771da55662cccd915afeb78cd01
      
https://github.com/qemu/qemu/commit/733bbc8ceaeeb771da55662cccd915afeb78cd01
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: make bdrv_start_throttled_reqs return void

The return value is unused and I am not sure why it would be useful.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a72f641407f4a59c3adb710a821736166a484b7f
      
https://github.com/qemu/qemu/commit/a72f641407f4a59c3adb710a821736166a484b7f
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M block/throttle-groups.c
    M include/block/throttle-groups.h

  Log Message:
  -----------
  block: move restarting of throttled reqs to block/throttle-groups.c

We want to remove throttled_reqs from block/io.c.  This is the easy
part---hide the handling of throttled_reqs during disable/enable of
throttling within throttle-groups.c.

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


  Commit: b6e84c97ed0d786a7cda4e184736e25bb8824c2c
      
https://github.com/qemu/qemu/commit/b6e84c97ed0d786a7cda4e184736e25bb8824c2c
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: extract bdrv_drain_poll/bdrv_co_yield_to_drain from 
bdrv_drain/bdrv_co_drain

Do not call bdrv_drain_recurse twice in bdrv_co_drain.  A small
tweak to the logic in Fam's patch, which is harmless since no
one implements bdrv_drain anyway.  But better get it right.

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


  Commit: ce0f141259f06fd77fde2519cc352618ad797ce2
      
https://github.com/qemu/qemu/commit/ce0f141259f06fd77fde2519cc352618ad797ce2
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/io.c
    M block/throttle-groups.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: introduce bdrv_no_throttling_begin/end

Extract the handling of throttling from bdrv_flush_io_queue.  These
new functions will soon become BdrvChildRole callbacks, as they can
be generalized to "beginning of drain" and "end of drain".

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


  Commit: 6b98bd649520d07df4d1b7a0a54ac73bf178519c
      
https://github.com/qemu/qemu/commit/6b98bd649520d07df4d1b7a0a54ac73bf178519c
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M block/linux-aio.c
    M block/raw-aio.h
    M block/raw-posix.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: plug whole tree at once, introduce bdrv_io_unplugged_begin/end

Extract the handling of io_plug "depth" from linux-aio.c and let the
main bdrv_drain loop do nothing but wait on I/O.

Like the two newly introduced functions, bdrv_io_plug and bdrv_io_unplug
now operate on all children.  The visit order is now symmetrical between
plug and unplug, making it possible for formats to implement plug/unplug.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dd7f7ed10459d4ed9787ba464cebf8c459491d8c
      
https://github.com/qemu/qemu/commit/dd7f7ed10459d4ed9787ba464cebf8c459491d8c
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/linux-aio.c
    M block/raw-aio.h
    M block/raw-posix.c

  Log Message:
  -----------
  linux-aio: make it more type safe

Replace void* with an opaque LinuxAioState type.

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


  Commit: 166fe9605128e9dfa2b20dd7cc97c64cc98394e4
      
https://github.com/qemu/qemu/commit/166fe9605128e9dfa2b20dd7cc97c64cc98394e4
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c

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

This is a function that simply calls into the block driver for doing a
read, providing the byte granularity interface we want to eventually
have everywhere, and using whatever interface that driver supports.

For now, this is just a wrapper for calling bs->drv->bdrv_co_readv().

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


  Commit: 78a07294d51c6575441ab058ed56de5d364d2833
      
https://github.com/qemu/qemu/commit/78a07294d51c6575441ab058ed56de5d364d2833
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M block/iscsi.c
    M block/nbd.c
    M block/raw_bsd.c

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

This is a function that simply calls into the block driver for doing a
write, providing the byte granularity interface we want to eventually
have everywhere, and using whatever interface that driver supports.

This one is a bit more interesting than the version for reads: It adds
support for .bdrv_co_writev_flags() everywhere, so that drivers
implementing this function can drop .bdrv_co_writev() now.

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


  Commit: 08844473820c93541fc47bdfeae0f2cc88cfab59
      
https://github.com/qemu/qemu/commit/08844473820c93541fc47bdfeae0f2cc88cfab59
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M trace-events

  Log Message:
  -----------
  block: Support AIO drivers in bdrv_driver_preadv/pwritev()

Instead of registering emulation functions as .bdrv_co_writev, just
directly check whether the function is there or not, and use the AIO
interface if it isn't. This makes the read/write functions more
consistent with how things are done in other places (flush, discard,
etc.)

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


  Commit: cab3a3563c5484f0bedbf5f78ab4a49e71a81fe7
      
https://github.com/qemu/qemu/commit/cab3a3563c5484f0bedbf5f78ab4a49e71a81fe7
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/block-backend.c
    M block/io.c
    M block/raw_bsd.c
    M hw/ide/macio.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev

It used to be an internal helper function just for implementing
bdrv_co_do_readv/writev(), but now that it's a public interface, it
deserves a name without "do" in it.

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


  Commit: 3fb06697ae30ea59bf245f967a043e60f2aedb17
      
https://github.com/qemu/qemu/commit/3fb06697ae30ea59bf245f967a043e60f2aedb17
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  block: Introduce .bdrv_co_preadv/pwritev BlockDriver function

Many parts of the block layer are already byte granularity. The block
driver interface, however, was still missing an interface that allows
making use of this. This patch introduces a new BlockDriver interface,
which is based on coroutines, vectored, has flags and uses a byte
granularity. This is now the preferred interface for new drivers.

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


  Commit: 3b8fd3301147585765624cd733e6172a25efcb58
      
https://github.com/qemu/qemu/commit/3b8fd3301147585765624cd733e6172a25efcb58
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/bochs.c

  Log Message:
  -----------
  bochs: Implement .bdrv_co_preadv() interface

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


  Commit: 5cd230819ec26caf199bf73d38cf2407344e4443
      
https://github.com/qemu/qemu/commit/5cd230819ec26caf199bf73d38cf2407344e4443
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/cloop.c

  Log Message:
  -----------
  cloop: Implement .bdrv_co_preadv() interface

This implements .bdrv_co_preadv() for the cloop block driver. While
updating the error paths, change -1 to a valid -errno code.

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


  Commit: 3edf1e73d568c646202e9faa6224df4fee1bd0e6
      
https://github.com/qemu/qemu/commit/3edf1e73d568c646202e9faa6224df4fee1bd0e6
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/dmg.c

  Log Message:
  -----------
  dmg: Implement .bdrv_co_preadv() interface

This implements .bdrv_co_preadv() for the cloop block driver. While
updating the error paths, change -1 to a valid -errno code.

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


  Commit: 0865bb6f0489a81043309fd4e9fd31c3657ee77e
      
https://github.com/qemu/qemu/commit/0865bb6f0489a81043309fd4e9fd31c3657ee77e
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vdi.c

  Log Message:
  -----------
  vdi: Implement .bdrv_co_preadv() interface

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


  Commit: fde9d56f5bf238bb126d9ddcf316083c40e6be28
      
https://github.com/qemu/qemu/commit/fde9d56f5bf238bb126d9ddcf316083c40e6be28
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vdi.c

  Log Message:
  -----------
  vdi: Implement .bdrv_co_pwritev() interface

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


  Commit: a844a2b0d4d11a9108c12caabb9a3eed265bf750
      
https://github.com/qemu/qemu/commit/a844a2b0d4d11a9108c12caabb9a3eed265bf750
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Add vmdk_find_offset_in_cluster()

This is a byte granularity version of vmdk_find_index_in_cluster().

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


  Commit: f10cc24359917da1347c0a56a2cbda3a5fcf9ce6
      
https://github.com/qemu/qemu/commit/f10cc24359917da1347c0a56a2cbda3a5fcf9ce6
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Implement .bdrv_co_preadv() interface

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


  Commit: 37b1d7d8c98e2faaa27593c33a858948209beea0
      
https://github.com/qemu/qemu/commit/37b1d7d8c98e2faaa27593c33a858948209beea0
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Implement .bdrv_co_pwritev() interface

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


  Commit: d46b7cc680fa74a2da6618018691d3bf7c2cd10b
      
https://github.com/qemu/qemu/commit/d46b7cc680fa74a2da6618018691d3bf7c2cd10b
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  vpc: Implement .bdrv_co_preadv() interface

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


  Commit: 513b0f026b35e2d10855718fe9939a6152e27fb9
      
https://github.com/qemu/qemu/commit/513b0f026b35e2d10855718fe9939a6152e27fb9
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  vpc: Implement .bdrv_co_pwritev() interface

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


  Commit: 4575eb496da8da595689b286e202929f06612585
      
https://github.com/qemu/qemu/commit/4575eb496da8da595689b286e202929f06612585
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: Implement .bdrv_co_preadv/pwritev interfaces

This doesn't really convert any of the actual vvfat logic to use
vectored I/O (and it's doubtful whether that would make sense), but
instead just adapts the wrappers to the modern interface.

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


  Commit: e3ddef25e93e7f00c2c407a6fb24b2c5dd26a43b
      
https://github.com/qemu/qemu/commit/e3ddef25e93e7f00c2c407a6fb24b2c5dd26a43b
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  block: Remove BlockDriver.bdrv_read/write

There are no block drivers left that implement the old .bdrv_read/write
interface, so it can be removed now. This gets us rid of the
corresponding emulation functions, too.

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


  Commit: 547cb1574e29082aa194ec65c43c8e08ac1f9aa8
      
https://github.com/qemu/qemu/commit/547cb1574e29082aa194ec65c43c8e08ac1f9aa8
  Author: Wei Jiangang <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Fix typo in comment

s/imlement/implement/

Signed-off-by: Wei Jiangang <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ed79f37d9b6f1d3543afe5103bbe9dab43484b66
      
https://github.com/qemu/qemu/commit/ed79f37d9b6f1d3543afe5103bbe9dab43484b66
  Author: Zhou Jie <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/curl.c
    M block/sheepdog.c

  Log Message:
  -----------
  block: always compile-check debug prints

Files with conditional debug statements should ensure that the printf is
always compiled. This prevents bitrot of the format string of the debug
statement. And switch debug output to stderr.

Signed-off-by: Zhou Jie <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f249924e96861f1dd7c5f79e62e3fb96c78e255d
      
https://github.com/qemu/qemu/commit/f249924e96861f1dd7c5f79e62e3fb96c78e255d
  Author: Janne Karhunen <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/vmdk.c
    M include/block/block_int.h
    M qemu-doc.texi
    M tests/qemu-iotests/common.filter

  Log Message:
  -----------
  Allow users to specify the vmdk virtual hardware version.

Vmdk images have metadata to indicate the vmware virtual
hardware version image was created/tested to run with.
Allow users to specify that version via new 'hwversion'
option.

[ kwolf: Adjust qemu-iotests common.filter ]

Signed-off-by: Janne Karhunen <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0e01b76e7cc43068f6b8cc05297f61539ccd5279
      
https://github.com/qemu/qemu/commit/0e01b76e7cc43068f6b8cc05297f61539ccd5279
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Fix memory leak in 'aio_write -z'

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8341f00dc207b80a1b2e7c7784890c9b0446d062
      
https://github.com/qemu/qemu/commit/8341f00dc207b80a1b2e7c7784890c9b0446d062
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/block-backend.c
    M block/crypto.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/sheepdog.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M hw/nvram/spapr_nvram.c
    M include/sysemu/block-backend.h
    M nbd/server.c
    M qemu-io-cmds.c

  Log Message:
  -----------
  block: Allow BDRV_REQ_FUA through blk_pwrite()

We have several block drivers that understand BDRV_REQ_FUA,
and emulate it in the block layer for the rest by a full flush.
But without a way to actually request BDRV_REQ_FUA during a
pass-through blk_pwrite(), FUA-aware block drivers like NBD are
forced to repeat the emulation logic of a full flush regardless
of whether the backend they are writing to could do it more
efficiently.

This patch just wires up a flags argument; followup patches
will actually make use of it in the NBD driver and in qemu-io.

Signed-off-by: Eric Blake <address@hidden>
Acked-by: Denis V. Lunev <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b7d17f9fa4df83ed060168c450889d73c441c8f6
      
https://github.com/qemu/qemu/commit/b7d17f9fa4df83ed060168c450889d73c441c8f6
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  block: Switch blk_read_unthrottled() to byte interface

Sector-based blk_read() should die; convert the one-off
variant blk_read_unthrottled().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 983a1600504b1b78242b9da29b0d7018a6eb231d
      
https://github.com/qemu/qemu/commit/983a1600504b1b78242b9da29b0d7018a6eb231d
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/block-backend.c
    M block/parallels.c
    M hw/scsi/scsi-disk.c
    M include/sysemu/block-backend.h
    M qemu-img.c
    M qemu-io-cmds.c

  Log Message:
  -----------
  block: Switch blk_*write_zeroes() to byte interface

Sector-based blk_write() should die; convert the one-off
variant blk_write_zeroes() to use an offset/count interface
instead.  Likewise for blk_co_write_zeroes() and
blk_aio_write_zeroes().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 60cb2fa7eb5431d8996589ebc5dde865c602d54b
      
https://github.com/qemu/qemu/commit/60cb2fa7eb5431d8996589ebc5dde865c602d54b
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  block: Introduce byte-based aio read/write

blk_aio_readv() and blk_aio_writev() are annoying in that they
can't access sub-sector granularity, and cannot pass flags.
Also, they require the caller to pass redundant information
about the size of the I/O (qiov->size in bytes must match
nb_sectors in sectors).

Add new blk_aio_preadv() and blk_aio_pwritev() functions to fix
the flaws. The next few patches will upgrade callers, then
finally delete the old interfaces.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d4f510eb3f56d30dd1312fe902138c430db2b361
      
https://github.com/qemu/qemu/commit/d4f510eb3f56d30dd1312fe902138c430db2b361
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M dma-helpers.c
    M hw/ide/core.c
    M hw/ide/internal.h
    M hw/ide/macio.c
    M include/sysemu/dma.h

  Log Message:
  -----------
  ide: Switch to byte-based aio block access

Sector-based blk_aio_readv() and blk_aio_writev() should die; switch
to byte-based blk_aio_preadv() and blk_aio_pwritev() instead.

The patch had to touch multiple files at once, because dma_blk_io()
takes pointers to the functions, and ide_issue_trim() piggybacks on
the same interface (while ignoring offset under the hood).

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 03c90063ccf5fd18b01448a8b23923769ab2ee21
      
https://github.com/qemu/qemu/commit/03c90063ccf5fd18b01448a8b23923769ab2ee21
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Switch to byte-based aio block access

Sector-based blk_aio_readv() and blk_aio_writev() should die; switch
to byte-based blk_aio_preadv() and blk_aio_pwritev() instead.

As part of the cleanup, scsi_init_iovec() no longer needs to return
a value, and reword a comment.

[ kwolf: Fix read accounting change ]

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b5772fdde40a8200fc20db4d5da672f1ce149d68
      
https://github.com/qemu/qemu/commit/b5772fdde40a8200fc20db4d5da672f1ce149d68
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/virtio-blk.c
    M trace-events

  Log Message:
  -----------
  virtio: Switch to byte-based aio block access

Sector-based blk_aio_readv() and blk_aio_writev() should die; switch
to byte-based blk_aio_preadv() and blk_aio_pwritev() instead.

The trace is modified at the same time, and nb_sectors is now
unused.  Fix a comment typo while in the vicinity.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2
      
https://github.com/qemu/qemu/commit/d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/xen_disk.c

  Log Message:
  -----------
  xen_disk: Switch to byte-based aio block access

Sector-based blk_aio_readv() and blk_aio_writev() should die; switch
to byte-based blk_aio_preadv() and blk_aio_pwritev() instead.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a7a5b7c0fc4caeeda59b4bc91d467c4c98db79cf
      
https://github.com/qemu/qemu/commit/a7a5b7c0fc4caeeda59b4bc91d467c4c98db79cf
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/fdc.c

  Log Message:
  -----------
  fdc: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9fc0d361cc412251500cfe3fe9a548a363c635be
      
https://github.com/qemu/qemu/commit/9fc0d361cc412251500cfe3fe9a548a363c635be
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/nand.c

  Log Message:
  -----------
  nand: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

This file is doing some complex computations to map various
flash page sizes (256, 512, and 2048) atop generic uses of
512-byte sector operations.  Perhaps someone will want to tidy
up the file for fewer gymnastics in managing addresses and
offsets, and less wasteful visits of 256-byte pages, but it
was out of scope for this series, where I just went with the
mechanical conversion.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 441692ddd8321d5e0f09b163e86410e578d87236
      
https://github.com/qemu/qemu/commit/441692ddd8321d5e0f09b163e86410e578d87236
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/onenand.c

  Log Message:
  -----------
  onenand: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

This particular device picks its size during onenand_initfn(),
and can be at most 0x80000000 bytes; therefore, shifting an
'int sec' request to get back to a byte offset should never
overflow 32 bits.  But adding assertions to document that point
should not hurt.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 098e732dbeb9d1f191da6fd6d0ddb66909690302
      
https://github.com/qemu/qemu/commit/098e732dbeb9d1f191da6fd6d0ddb66909690302
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/pflash_cfi01.c
    M hw/block/pflash_cfi02.c

  Log Message:
  -----------
  pflash: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 12c125cba9c548929ccf4da2515e5b795c94afd9
      
https://github.com/qemu/qemu/commit/12c125cba9c548929ccf4da2515e5b795c94afd9
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/sd/sd.c

  Log Message:
  -----------
  sd: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

Greatly simplifies the code, now that we let the block layer
take care of alignment and read-modify-write on our behalf :)
In fact, we no longer need to include 'buf' in the migration
stream (although we do have to ensure that the stream remains
compatible).

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 243e6f69c129303cb7f161466e989722e9d7e02f
      
https://github.com/qemu/qemu/commit/243e6f69c129303cb7f161466e989722e9d7e02f
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/block/m25p80.c

  Log Message:
  -----------
  m25p80: Switch to byte-based block access

Sector-based blk_read() should die; switch to byte-based
blk_pread() instead.

Likewise for blk_aio_readv() and blk_aio_writev().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 26a122d3d47205969ca9e4cdba13adc2b2929d8c
      
https://github.com/qemu/qemu/commit/26a122d3d47205969ca9e4cdba13adc2b2929d8c
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M hw/ide/atapi.c

  Log Message:
  -----------
  atapi: Switch to byte-based block access

Sector-based blk_read() should die; switch to byte-based
blk_pread() instead.

Add new defines ATAPI_SECTOR_BITS and ATAPI_SECTOR_SIZE to
use anywhere we were previously scaling BDRV_SECTOR_* by 4,
for better legibility.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bd31c214c328bc6a2b2f5567623d964b65c8f44c
      
https://github.com/qemu/qemu/commit/bd31c214c328bc6a2b2f5567623d964b65c8f44c
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-nbd.c

  Log Message:
  -----------
  nbd: Switch to byte-based block access

Sector-based blk_read() should die; switch to byte-based
blk_pread() instead.

Add a constant for our magic number 512, to make it obvious
that this size will NOT change even if BDRV_SECTOR_SIZE does,
even though the two happen to be the same for now.  Split
assignments from conditionals to keep checkpatch.pl happy.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9166920a0b8481dde8d011d07cc4c733c81223eb
      
https://github.com/qemu/qemu/commit/9166920a0b8481dde8d011d07cc4c733c81223eb
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7b3f9712e1b64bd811ac3657fc1cb05f9e3f5d87
      
https://github.com/qemu/qemu/commit/7b3f9712e1b64bd811ac3657fc1cb05f9e3f5d87
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Switch to byte-based block access

qemu-io is the last user of several sector-based interfaces.
This patch upgrades to the new interfaces under the hood,
then deletes the resulting dead code.  Note that for maximum
back-compat, while the -p option is no longer required to get
blk_pread(), it is still needed to allow for unaligned access;
this is because qemu-iotest 23 relies on qemu-io rejecting
unaligned accesses without -p.  A later patch may clean up the
interface to be more user-friendly, but it's better to separate
what's done under the hood from what the user sees.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7b1deac84e2a06530b3a5855ff46a27e87a74820
      
https://github.com/qemu/qemu/commit/7b1deac84e2a06530b3a5855ff46a27e87a74820
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  block: Kill unused sector-based blk_* functions

Now that there are no remaining clients, we can drop the
sector-based blk_read(), blk_write(), blk_aio_readv(), and
blk_aio_writev().  Sadly, there are still remaining
sector-based interfaces, such as blk_*discard(), or
blk_write_compressed(); those will have to wait for another
day.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2928abce6d1d426d37c0a9bd5f85fb95cf33f709
      
https://github.com/qemu/qemu/commit/2928abce6d1d426d37c0a9bd5f85fb95cf33f709
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: improve qcow2_co_write_zeroes()

There is a possibility that qcow2_co_write_zeroes() will be called
with the partial block. This could be synthetically triggered with
    qemu-io -c "write -z 32k 4k"
and can happen in the real life in qemu-nbd. The latter happens under
the following conditions:
    (1) qemu-nbd is started with --detect-zeroes=on and is connected to the
  kernel NBD client
    (2) third party program opens kernel NBD device with O_DIRECT
    (3) third party program performs write operation with memory buffer
  not aligned to the page
In this case qcow2_co_write_zeroes() is unable to perform the operation
and mark entire cluster as zeroed and returns ENOTSUP. Thus the caller
switches to non-optimized version and writes real zeroes to the disk.

The patch creates a shortcut. If the block is read as zeroes, f.e. if
it is unallocated, the request is extended to cover full block.
User-visible situation with this block is not changed. Before the patch
the block is filled in the image with real zeroes. After that patch the
block is marked as zeroed in metadata. Thus any subsequent changes in
backing store chain are not affected.

Kevin, thank you for a cool suggestion.

Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Roman Kagan <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4df863f336b76faf55f796eed7cd7f7c55ec0130
      
https://github.com/qemu/qemu/commit/4df863f336b76faf55f796eed7cd7f7c55ec0130
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M block/iscsi.c
    M block/nbd-client.c
    M block/nbd.c
    M block/raw_bsd.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Make supported_write_flags a per-bds property

Pre-patch, .supported_write_flags lives at the driver level, which
means we are blindly declaring that all block devices using a
given driver will either equally support FUA, or that we need a
fallback at the block layer.  But there are drivers where FUA
support is a per-block decision: the NBD block driver is dependent
on the remote server advertising NBD_FLAG_SEND_FUA (and has
fallback code to duplicate the flush that the block layer would do
if NBD had not set .supported_write_flags); and the iscsi block
driver is dependent on the mode sense bits advertised by the
underlying device (and is currently silently ignoring FUA requests
if the underlying device does not support FUA).

The fix is to make supported flags as a per-BDS option, set during
.bdrv_open().  This patch moves the variable and fixes NBD and iscsi
to set it only conditionally; later patches will then further
simplify the NBD driver to quit duplicating work done at the block
layer, as well as tackle the fact that SCSI does not support FUA
semantics on WRITESAME(10/16) but only on WRITE(10/16).

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


  Commit: 465fe887ccdcb62733666f6e91d85e88b7184298
      
https://github.com/qemu/qemu/commit/465fe887ccdcb62733666f6e91d85e88b7184298
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/io.c
    M block/iscsi.c
    M block/raw-posix.c
    M block/raw_bsd.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Honor BDRV_REQ_FUA during write_zeroes

The block layer has a couple of cases where it can lose
Force Unit Access semantics when writing a large block of
zeroes, such that the request returns before the zeroes
have been guaranteed to land on underlying media.

SCSI does not support FUA during WRITESAME(10/16); FUA is only
supported if it falls back to WRITE(10/16).  But where the
underlying device is new enough to not need a fallback, it
means that any upper layer request with FUA semantics was
silently ignoring BDRV_REQ_FUA.

Conversely, NBD has situations where it can support FUA but not
ZERO_WRITE; when that happens, the generic block layer fallback
to bdrv_driver_pwritev() (or the older bdrv_co_writev() in qemu
2.6) was losing the FUA flag.

The problem of losing flags unrelated to ZERO_WRITE has been
latent in bdrv_co_do_write_zeroes() since commit aa7bfbff, but
back then, it did not matter because there was no FUA flag.  It
became observable when commit 93f5e6d8 paved the way for flags
that can impact correctness, when we should have been using
bdrv_co_writev_flags() with modified flags.  Compare to commit
9eeb6dd, which got flag manipulation right in
bdrv_co_do_zero_pwritev().

Symptoms: I tested with qemu-io with default writethrough cache
(which is supposed to use FUA semantics on every write), and
targetted an NBD client connected to a server that intentionally
did not advertise NBD_FLAG_SEND_FUA.  When doing 'write 0 512',
the NBD client sent two operations (NBD_CMD_WRITE then
NBD_CMD_FLUSH) to get the fallback FUA semantics; but when doing
'write -z 0 512', the NBD client sent only NBD_CMD_WRITE.

The fix is do to a cleanup bdrv_co_flush() at the end of the
operation if any step in the middle relied on a BDS that does
not natively support FUA for that step (note that we don't
need to flush after every operation, if the operation is broken
into chunks based on bounce-buffer sizing).  Each BDS gains a
new flag .supported_zero_flags, which parallels the use of
.supported_write_flags but only when accessing a zero write
operation (the flags MUST be different, because of SCSI having
different semantics based on WRITE vs. WRITESAME; and also
because BDRV_REQ_MAY_UNMAP only makes sense on zero writes).

Also fix some documentation to describe -ENOTSUP semantics,
particularly since iscsi depends on those semantics.

Down the road, we may want to add a driver where its
.bdrv_co_pwritev() honors all three of BDRV_REQ_FUA,
BDRV_REQ_ZERO_WRITE, and BDRV_REQ_MAY_UNMAP, and advertise
this via bs->supported_write_flags for blocks opened by that
driver; such a driver should NOT supply .bdrv_co_write_zeroes
nor .supported_zero_flags.  But none of the drivers touched
in this patch want to do that (the act of writing zeroes is
different enough from normal writes to deserve a second
callback).

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


  Commit: 52a46505742cce4b4b7f88d32636f848287e6bfb
      
https://github.com/qemu/qemu/commit/52a46505742cce4b4b7f88d32636f848287e6bfb
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/nbd-client.c
    M block/nbd-client.h
    M block/nbd.c

  Log Message:
  -----------
  nbd: Simplify client FUA handling

Now that the block layer honors per-bds FUA support, we don't
have to duplicate the fallback flush at the NBD layer.  The
static function nbd_co_writev_flags() is no longer needed, and
the driver can just directly use nbd_client_co_writev().

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


  Commit: 0d1c5c91607d1c55a8f5db39c57c6e5c76e21131
      
https://github.com/qemu/qemu/commit/0d1c5c91607d1c55a8f5db39c57c6e5c76e21131
  Author: Fam Zheng <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Invalidate all children

Currently we only recurse to bs->file, which will miss the children in quorum
and VMDK.

Recurse into the whole subtree to avoid that.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c9e9e9c66cee9932fb28a41a4659aa421a7a3f78
      
https://github.com/qemu/qemu/commit/c9e9e9c66cee9932fb28a41a4659aa421a7a3f78
  Author: Fam Zheng <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c

  Log Message:
  -----------
  block: Drop superfluous invalidating bs->file from drivers

Now they are invalidated by the block layer, so it's not necessary to
do this in block drivers' implementations of .bdrv_invalidate_cache.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: aad0b7a0bfbd6d200f617396c0d3b71ac7abfa40
      
https://github.com/qemu/qemu/commit/aad0b7a0bfbd6d200f617396c0d3b71ac7abfa40
  Author: Fam Zheng <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Inactivate all children

Currently we only inactivate the top BDS. Actually bdrv_inactivate
should be the opposite of bdrv_invalidate_cache.

Recurse into the whole subtree instead.

Because a node may have multiple parents, and because once
BDRV_O_INACTIVE is set for a node, further writes are not allowed, we
cannot interleave flag settings and .bdrv_inactivate calls (that may
submit write to other nodes in a graph) within a single pass. Therefore
two passes are used here.

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


  Commit: 9036e87c7437388365a419a5f26445eb7809b941
      
https://github.com/qemu/qemu/commit/9036e87c7437388365a419a5f26445eb7809b941
  Author: Wei Jiangang <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M tests/qemu-iotests/083

  Log Message:
  -----------
  iotests: fix the redirection order in 083

It should redirect stdout to /dev/null first,
then redirect stderr to whatever stdout currently points at.

Signed-off-by: Wei Jiangang <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 263a6f4c3aa9b6cd9f58d1368b318d948156a4e8
      
https://github.com/qemu/qemu/commit/263a6f4c3aa9b6cd9f58d1368b318d948156a4e8
  Author: Ren Kimura <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: check block status of backing file when converting.

When converting images, check the block status of its backing file chain
to avoid needlessly reading zeros.

Signed-off-by: Ren Kimura <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: e06018ad28874703c65dbdcfa4a5cb8aed4550ec
      
https://github.com/qemu/qemu/commit/e06018ad28874703c65dbdcfa4a5cb8aed4550ec
  Author: Wen Congyang <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  Add new block driver interface to add/delete a BDS's child

In some cases, we want to take a quorum child offline, and take
another child online.

Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 98292c61bc491b660c9fa2ccbdbb35131921ea65
      
https://github.com/qemu/qemu/commit/98292c61bc491b660c9fa2ccbdbb35131921ea65
  Author: Wen Congyang <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  quorum: implement bdrv_add_child() and bdrv_del_child()

Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Message-id: address@hidden
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 7f82159769261419e0f3905cf758cfc4850bb26f
      
https://github.com/qemu/qemu/commit/7f82159769261419e0f3905cf758cfc4850bb26f
  Author: Wen Congyang <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  qmp: add monitor command to add/remove a child

The new QMP command name is x-blockdev-change. It's just for adding/removing
quorum's child now, and doesn't support all kinds of children, all kinds of
operations, nor all block drivers. So it is experimental now.

Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: e4e12bb26d9f2e2de02ff888063f41cc1e1b3935
      
https://github.com/qemu/qemu/commit/e4e12bb26d9f2e2de02ff888063f41cc1e1b3935
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Add missing option documentation

The Usage: summary is missing several options, but rather than
having to maintain it, it's simpler to just state [OPTIONS],
since the options are spelled out below.

Commit 499afa2 added --image-opts, but forgot to document it in
--help.  Likewise for commit 9e8f183 and -d/--discard.

Commit e3aff4f6 put "-o/--offset" in the long opts, but it has
never been honored.

Add a note that '-n' is short for '-t none'.

Commit 9a2d77ad killed the -C option, but forgot to undocument
it for the 'open' subcommand.

Finally, commit 10d9d75 removed -g/--growable, but forgot to
cull it from the valid short options.

Signed-off-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: b8d970f1a966b3c46233462879d4d5ab0bdd1712
      
https://github.com/qemu/qemu/commit/b8d970f1a966b3c46233462879d4d5ab0bdd1712
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Make 'open' subcommand more like command line

The command line defaults to BDRV_O_UNMAP, but can use
-d to reset it.  Meanwhile, the 'open' subcommand was
defaulting to no discards, with no way to set it.

The command line has both -n and -tMODE to set a variety
of cache modes, but the 'open' subcommand had only -n.

The 'open' subcommand had no way to set BDRV_O_NATIVE_AIO.

Note that the 'reopen' subcommand uses '-c' where the
command line and 'open' use -t.  Making that consistent
would be a separate patch.

Signed-off-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: dc38852aaa4ac187d8b44201f75fc2835241912d
      
https://github.com/qemu/qemu/commit/dc38852aaa4ac187d8b44201f75fc2835241912d
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Use bool for command line flags

We require a C99 compiler; let's use it to express what we
really mean.

(Yes, we now have an instance of 'if (bool + bool + bool > 1)',
which, although semantically valid C, looks ugly; it gets
cleaned up later.)

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 093ea232b0a3359ce60ab0f535d9bd04454d39eb
      
https://github.com/qemu/qemu/commit/093ea232b0a3359ce60ab0f535d9bd04454d39eb
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c
    M tests/qemu-iotests/023.out

  Log Message:
  -----------
  qemu-io: Allow unaligned access by default

There's no reason to require the user to specify a flag just so
they can pass in unaligned numbers.  Keep 'read -p' and 'write -p'
as no-ops so that I don't have to hunt down and update all users
of qemu-io, but otherwise make their behavior default as 'read' and
'write'.  Also fix 'write -z', 'readv', 'writev', 'writev',
'aio_read', 'aio_write', and 'aio_write -z'.  For now, 'read -b',
'write -b', and 'write -c' still require alignment (and 'multiwrite',
but that's slated to die soon).

qemu-iotest 23 is updated to match, as the only test that was
previously explicitly expecting an error on an unaligned request.

Signed-off-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 770e0e0e808c6cd361c718ca1a936ed18864c69e
      
https://github.com/qemu/qemu/commit/770e0e0e808c6cd361c718ca1a936ed18864c69e
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Add 'write -f' to test FUA flag

Make it easier to test block drivers with BDRV_REQ_FUA in
.supported_write_flags, by adding the '-f' flag to qemu-io to
conditionally pass the flag through to specific writes ('write',
'write -z', 'writev', 'aio_write', 'aio_write -z'). You'll want
to use 'qemu-io -t none' to actually make -f useful (as
otherwise, the default writethrough mode automatically sets the
FUA bit on every write).

Signed-off-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: c2e001cc829031f9c2e2c364c77861e3f75ac871
      
https://github.com/qemu/qemu/commit/c2e001cc829031f9c2e2c364c77861e3f75ac871
  Author: Eric Blake <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Add 'write -z -u' to test MAY_UNMAP flag

Make it easier to control whether the BDRV_REQ_MAY_UNMAP flag
can be passed through a write_zeroes command, by adding the '-u'
flag to qemu-io 'write -z' and 'aio_write -z'.  To be useful,
the device has to be opened with BDRV_O_UNMAP (done by default
in qemu-io, but can be made explicit with '-d unmap').

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 076003f526cebbf5bbef826f752019da5d2c3e89
      
https://github.com/qemu/qemu/commit/076003f526cebbf5bbef826f752019da5d2c3e89
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/137.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  block: add support for --image-opts in block I/O tests

Currently all block tests use the traditional syntax for images
just specifying a filename. To support the LUKS driver without
resorting to JSON, the tests need to be able to use the new
--image-opts argument to qemu-img and qemu-io.

This introduces a new env variable IMGOPTSSYNTAX. If this is
set to 'true', then qemu-img/qemu-io should use --image-opts.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: b7e875b2f98c2724b5f915f5808f8828fd9b05a8
      
https://github.com/qemu/qemu/commit/b7e875b2f98c2724b5f915f5808f8828fd9b05a8
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  block: add support for encryption secrets in block I/O tests

The LUKS block driver tests will require the ability to specify
encryption secrets with block devices. This requires using the
--object argument to qemu-img/qemu-io to create a 'secret'
object.

When the IMGKEYSECRET env variable is set, it provides the
password to be associated with a secret called 'keysec0'

The _qemu_img_wrapper function isn't modified as that needs
to cope with differing syntax for subcommands, so can't be
made to use the image opts syntax unconditionally.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 4e9b25fb054257712004272f35de508a6ae998e5
      
https://github.com/qemu/qemu/commit/4e9b25fb054257712004272f35de508a6ae998e5
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M tests/qemu-iotests/004
    M tests/qemu-iotests/012
    M tests/qemu-iotests/048
    M tests/qemu-iotests/048.out
    M tests/qemu-iotests/052
    M tests/qemu-iotests/052.out
    M tests/qemu-iotests/100
    M tests/qemu-iotests/100.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  block: enable testing of LUKS driver with block I/O tests

This adds support for testing the LUKS driver with the block
I/O test framework.

   cd tests/qemu-io-tests
   ./check -luks

A handful of test cases are modified to work with luks

 - 004 - whitelist luks format
 - 012 - use TEST_IMG_FILE instead of TEST_IMG for file ops
 - 048 - use TEST_IMG_FILE instead of TEST_IMG for file ops.
   don't assume extended image contents is all zeros,
   explicitly initialize with zeros
   Make file size smaller to avoid having to decrypt
   1 GB of data.
 - 052 - don't assume initial image contents is all zeros,
   explicitly initialize with zeros
 - 100 - don't assume initial image contents is all zeros,
   explicitly initialize with zeros

With this patch applied, the results are as follows:

  Passed: 001 002 003 004 005 008 009 010 011 012 021 032 043
    047 048 049 052 087 100 134 143
  Failed: 033 120 140 145
 Skipped: 007 013 014 015 017 018 019 020 022 023 024 025 026
    027 028 029 030 031 034 035 036 037 038 039 040 041
    042 043 044 045 046 047 049 050 051 053 054 055 056
    057 058 059 060 061 062 063 064 065 066 067 068 069
    070 071 072 073 074 075 076 077 078 079 080 081 082
    083 084 085 086 087 088 089 090 091 092 093 094 095
    096 097 098 099 101 102 103 104 105 107 108 109 110
    111 112 113 114 115 116 117 118 119 121 122 123 124
    128 129 130 131 132 133 134 135 136 137 138 139 141
    142 144 146 148 150 152

The reasons for the failed tests are:

 - 033 - needs adapting to use image opts syntax with blkdebug
   and test image in order to correctly set align property
 - 120 - needs adapting to use correct -drive syntax for luks
 - 140 - needs adapting to use correct -drive syntax for luks
 - 145 - needs adapting to use correct -drive syntax for luks

The vast majority of skipped tests are exercising code that is
qcow2 specific, though a couple could probably be usefully
enabled for luks too.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 5a8fabf3333c8b445f514377a4292ad0354fd35c
      
https://github.com/qemu/qemu/commit/5a8fabf3333c8b445f514377a4292ad0354fd35c
  Author: Sascha Silbe <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

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

  Log Message:
  -----------
  qemu-iotests: iotests: fail hard if not run via "check"

Running an iotests-based Python test directly might appear to work,
but may fail in subtle ways and is insecure:

- It creates files with predictable file names in a world-writable
  location (/var/tmp).

- Tests expect the environment to be set up by check. E.g. 041 and 055
  may take the wrong code paths if QEMU_DEFAULT_MACHINE is not
  set. This can lead to false negatives.

Instead fail hard and tell the user we want to be run via "check".

The actual environment expected by the tests is currently only defined
by the implementation of "check". We use two of the environment
variables set by "check" as indication of whether we're being run via
"check". Anyone writing their own test runner (replacing "check") will
need to replicate the full environment (in a broader sense, not just
environment variables) provided by "check" anyway, including setting
the two environment variables we check. Whereas a regular developer
just trying to invoke the tests usually won't have both of these
defined in their environment so we can catch their mistake and give
out useful advice.

Signed-off-by: Sascha Silbe <address@hidden>
Reviewed-by: Bo Tu <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: efc2645f714aae1bcf22e8165cad51c57f34fdf3
      
https://github.com/qemu/qemu/commit/efc2645f714aae1bcf22e8165cad51c57f34fdf3
  Author: Kevin Wolf <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block.c
    M block/quorum.c
    M blockdev.c
    M include/block/block.h
    M include/block/block_int.h
    M qapi/block-core.json
    M qemu-img.c
    M qemu-io-cmds.c
    M qemu-io.c
    M qmp-commands.hx
    M tests/qemu-iotests/004
    M tests/qemu-iotests/012
    M tests/qemu-iotests/023.out
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/048
    M tests/qemu-iotests/048.out
    M tests/qemu-iotests/052
    M tests/qemu-iotests/052.out
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/083
    M tests/qemu-iotests/100
    M tests/qemu-iotests/100.out
    M tests/qemu-iotests/137.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-05-12' 
into queue-block

Block patches for 2.7

# gpg: Signature made Thu May 12 15:34:13 2016 CEST using RSA key ID E838ACAD
# gpg: Good signature from "Max Reitz <address@hidden>"

* mreitz/tags/pull-block-for-kevin-2016-05-12:
  qemu-iotests: iotests: fail hard if not run via "check"
  block: enable testing of LUKS driver with block I/O tests
  block: add support for encryption secrets in block I/O tests
  block: add support for --image-opts in block I/O tests
  qemu-io: Add 'write -z -u' to test MAY_UNMAP flag
  qemu-io: Add 'write -f' to test FUA flag
  qemu-io: Allow unaligned access by default
  qemu-io: Use bool for command line flags
  qemu-io: Make 'open' subcommand more like command line
  qemu-io: Add missing option documentation
  qmp: add monitor command to add/remove a child
  quorum: implement bdrv_add_child() and bdrv_del_child()
  Add new block driver interface to add/delete a BDS's child
  qemu-img: check block status of backing file when converting.
  iotests: fix the redirection order in 083

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


  Commit: f68419eee9a966f5a915314c43cda6778f976a77
      
https://github.com/qemu/qemu/commit/f68419eee9a966f5a915314c43cda6778f976a77
  Author: Peter Maydell <address@hidden>
  Date:   2016-05-12 (Thu, 12 May 2016)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/bochs.c
    M block/cloop.c
    M block/crypto.c
    M block/curl.c
    M block/dmg.c
    M block/io.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/nbd-client.c
    M block/nbd-client.h
    M block/nbd.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/raw-aio.h
    M block/raw-posix.c
    M block/raw_bsd.c
    M block/sheepdog.c
    M block/throttle-groups.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 dma-helpers.c
    M hw/block/fdc.c
    M hw/block/hd-geometry.c
    M hw/block/m25p80.c
    M hw/block/nand.c
    M hw/block/onenand.c
    M hw/block/pflash_cfi01.c
    M hw/block/pflash_cfi02.c
    M hw/block/virtio-blk.c
    M hw/block/xen_disk.c
    M hw/ide/atapi.c
    M hw/ide/core.c
    M hw/ide/internal.h
    M hw/ide/macio.c
    M hw/nvram/spapr_nvram.c
    M hw/scsi/scsi-disk.c
    M hw/sd/sd.c
    M include/block/block.h
    M include/block/block_int.h
    M include/block/throttle-groups.h
    M include/sysemu/block-backend.h
    M include/sysemu/dma.h
    M nbd/server.c
    M qapi/block-core.json
    M qemu-doc.texi
    M qemu-img.c
    M qemu-io-cmds.c
    M qemu-io.c
    M qemu-nbd.c
    M qmp-commands.hx
    M tests/qemu-iotests/004
    M tests/qemu-iotests/012
    M tests/qemu-iotests/023.out
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/048
    M tests/qemu-iotests/048.out
    M tests/qemu-iotests/052
    M tests/qemu-iotests/052.out
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/083
    M tests/qemu-iotests/100
    M tests/qemu-iotests/100.out
    M tests/qemu-iotests/137.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py
    M trace-events

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

Block layer patches

# gpg: Signature made Thu 12 May 2016 14:37:05 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (69 commits)
  qemu-iotests: iotests: fail hard if not run via "check"
  block: enable testing of LUKS driver with block I/O tests
  block: add support for encryption secrets in block I/O tests
  block: add support for --image-opts in block I/O tests
  qemu-io: Add 'write -z -u' to test MAY_UNMAP flag
  qemu-io: Add 'write -f' to test FUA flag
  qemu-io: Allow unaligned access by default
  qemu-io: Use bool for command line flags
  qemu-io: Make 'open' subcommand more like command line
  qemu-io: Add missing option documentation
  qmp: add monitor command to add/remove a child
  quorum: implement bdrv_add_child() and bdrv_del_child()
  Add new block driver interface to add/delete a BDS's child
  qemu-img: check block status of backing file when converting.
  iotests: fix the redirection order in 083
  block: Inactivate all children
  block: Drop superfluous invalidating bs->file from drivers
  block: Invalidate all children
  nbd: Simplify client FUA handling
  block: Honor BDRV_REQ_FUA during write_zeroes
  ...

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


Compare: https://github.com/qemu/qemu/compare/e4f70d635863...f68419eee9a9

reply via email to

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