qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] cfef6a: qemu-img: fix failed autotests


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] cfef6a: qemu-img: fix failed autotests
Date: Wed, 06 Jul 2016 02:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cfef6a45c7201c8219d819d792e5d99bbff32308
      
https://github.com/qemu/qemu/commit/cfef6a45c7201c8219d819d792e5d99bbff32308
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: fix failed autotests

There are 9 iotests failed on Ubuntu 15.10 at the moment.
The problem is that options parsing in qemu-img is broken by the
following commit:
    commit 10985131e337a0c52c5bd1e191fd7867a6ff8d02
    Author: Denis V. Lunev <address@hidden>
    Date:   Fri Jun 17 17:44:13 2016 +0300
    qemu-img: move common options parsing before commands processing

This strange command line reports error
  ./qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- 1024
  qemu-img: Invalid image size specified!
while original code parses it successfully.

The problem is that getopt_long state should be reset. This could be done
using this assignment according to the manual:
    optind = 0

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


  Commit: cff86b38aca34c9cc5c6f8846cc1c5b3d181c376
      
https://github.com/qemu/qemu/commit/cff86b38aca34c9cc5c6f8846cc1c5b3d181c376
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Tighter assertions on bdrv_aligned_pwritev()

For symmetry with bdrv_aligned_preadv(), assert that the caller
really has aligned things properly. This requires adding an align
parameter, which is used now only in the new asserts, but will
come in handy in a later patch that adds auto-fragmentation to the
max transfer size, since that value need not always be a multiple
of the alignment, and therefore must be rounded down.

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


  Commit: a604fa2ba55f645abbb082469ed595f58f657ac8
      
https://github.com/qemu/qemu/commit/a604fa2ba55f645abbb082469ed595f58f657ac8
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Document supported flags during bdrv_aligned_preadv()

We don't pass any flags on to drivers to handle.  Tighten an
assert to explain why we pass 0 to bdrv_driver_preadv(), and add
some comments on things to be aware of if we want to turn on
per-BDS BDRV_REQ_FUA support during reads in the future.  Also,
document that we may want to consider using unmap during
copy-on-read operations where the read is all zeroes.

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


  Commit: 82524274eada16bfa2a263cbdbcae0fe948ed040
      
https://github.com/qemu/qemu/commit/82524274eada16bfa2a263cbdbcae0fe948ed040
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Fix harmless off-by-one in bdrv_aligned_preadv()

If the amount of data to read ends exactly on the total size
of the bs, then we were wasting time creating a local qiov
to read the data in preparation for what would normally be
appending zeroes beyond the end, even though this corner case
has nothing further to do.

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


  Commit: 476b923c32ece0e268580776aaf1fab4ab4459a8
      
https://github.com/qemu/qemu/commit/476b923c32ece0e268580776aaf1fab4ab4459a8
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

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

  Log Message:
  -----------
  nbd: Allow larger requests

The NBD layer was breaking up request at a limit of 2040 sectors
(just under 1M) to cater to old qemu-nbd. But the server limit
was raised to 32M in commit 2d8214885 to match the kernel, more
than three years ago; and the upstream NBD Protocol is proposing
documentation that without any explicit communication to state
otherwise, a client should be able to safely assume that a 32M
transaction will work.  It is time to rely on the larger sizing,
and any downstream distro that cares about maximum
interoperability to older qemu-nbd servers can just tweak the
value of #define NBD_MAX_SECTORS.

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


  Commit: 202204717a7e73971cccebd38c5d8ac4b0bfcef8
      
https://github.com/qemu/qemu/commit/202204717a7e73971cccebd38c5d8ac4b0bfcef8
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: Advertise realistic limits to block layer

We were basing the advertisement of maximum discard and transfer
length off of UINT32_MAX, but since the rest of the block layer
has signed int limits on a transaction, nothing could ever reach
that maximum, and we risk overflowing an int once things are
converted to byte-based rather than sector-based limits.  What's
more, we DO have a much smaller limit: both the current kernel
and qemu-nbd have a hard limit of 32M on a read or write
transaction, and while they may also permit up to a full 32 bits
on a discard transaction, the upstream NBD protocol is proposing
wording that without any explicit advertisement otherwise,
clients should limit ALL requests to the same limits as read and
write, even though the other requests do not actually require as
many bytes across the wire.  So the better limit to tell the
block layer is 32M for both values.

Behavior doesn't actually change with this patch (the block layer
is currently ignoring the max_transfer advertisements); but when
that problem is fixed in a later series, this patch will prevent
the exposure of a latent bug.

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


  Commit: f9e95af0a6be281f56ecc8413ea4a3ac3545ce17
      
https://github.com/qemu/qemu/commit/f9e95af0a6be281f56ecc8413ea4a3ac3545ce17
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: Advertise realistic limits to block layer

The function sector_limits_lun2qemu() returns a value in units of
the block layer's 512-byte sector, and can be as large as
0x40000000, which is much larger than the block layer's inherent
limit of BDRV_REQUEST_MAX_SECTORS.  The block layer already
handles '0' as a synonym to the inherent limit, and it is nicer
to return this value than it is to calculate an arbitrary
maximum, for two reasons: we want to ensure that the block layer
continues to special-case '0' as 'no limit beyond the inherent
limits'; and we want to be able to someday expand the block
layer to allow 64-bit limits, where auditing for uses of
BDRV_REQUEST_MAX_SECTORS will help us make sure we aren't
artificially constraining iscsi to old block layer limits.

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


  Commit: efaf4781a995aacd22b1dd521b14e4644bafae14
      
https://github.com/qemu/qemu/commit/efaf4781a995aacd22b1dd521b14e4644bafae14
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

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

  Log Message:
  -----------
  scsi: Advertise limits by blocksize, not 512

s->blocksize may be larger than 512, in which case our
tweaks to max_xfer_len and opt_xfer_len must be scaled
appropriately.

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


  Commit: 24ce9a20260713e86377cfa78fb8699335759f4f
      
https://github.com/qemu/qemu/commit/24ce9a20260713e86377cfa78fb8699335759f4f
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/block-backend.c
    M hw/block/virtio-blk.c
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  block: Give nonzero result to blk_get_max_transfer_length()

Making all callers special-case 0 as unlimited is awkward,
and we DO have a hard maximum of BDRV_REQUEST_MAX_SECTORS given
our current block layer API limits.

In the case of scsi, this means that we now always advertise a
limit to the guest, even in cases where the underlying layers
previously use 0 for no inherent limit beyond the block layer.

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


  Commit: 835db3ee7b2ab9643bcfc2a9816133e93c78476f
      
https://github.com/qemu/qemu/commit/835db3ee7b2ab9643bcfc2a9816133e93c78476f
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

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

  Log Message:
  -----------
  blkdebug: Set request_alignment during .bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

Note that when the user does not provide "align", then we were
defaulting to bs->request_alignment - but at this stage in the
initialization, that was always 512.  We were also rejecting an
explicit "align":0 from the user; this patch now allows that,
as an explicit request for the default alignment (which may not
always be 512 in the future).

qemu-iotests 77 is particularly sensitive to the fact that we
can specify an artificial alignment override in blkdebug, and
that override must continue to work even when limits are
refreshed on an already open device.

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


  Commit: c8b3b998e2bb61e511591f126be9d362d80d705d
      
https://github.com/qemu/qemu/commit/c8b3b998e2bb61e511591f126be9d362d80d705d
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: Set request_alignment during .bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

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


  Commit: a84178ccff77d48261d31a78f1edfc58c9bdaa47
      
https://github.com/qemu/qemu/commit/a84178ccff77d48261d31a78f1edfc58c9bdaa47
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Set request_alignment during .bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

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


  Commit: 2914a1de992118286f5280eddf4f4e6060a8e00b
      
https://github.com/qemu/qemu/commit/2914a1de992118286f5280eddf4f4e6060a8e00b
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/raw-win32.c

  Log Message:
  -----------
  raw-win32: Set request_alignment during .bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

In this case, raw_probe_alignment() already did what we needed,
so just fix its signature and wire it in correctly.

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


  Commit: a65064816d64db463f4c24bd81dcaad62fee89eb
      
https://github.com/qemu/qemu/commit/a65064816d64db463f4c24bd81dcaad62fee89eb
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/bochs.c
    M block/cloop.c
    M block/dmg.c
    M block/vvfat.c

  Log Message:
  -----------
  block: Set request_alignment during .bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

Add a .bdrv_refresh_limits() to all four of our legacy devices
that will always be sector-only (bochs, cloop, dmg, vvfat), in
spite of their recent conversion to expose a byte interface.

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


  Commit: 79ba8c986adb9ca07f52abd0b3d33c3aee8e6ff9
      
https://github.com/qemu/qemu/commit/79ba8c986adb9ca07f52abd0b3d33c3aee8e6ff9
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/io.c

  Log Message:
  -----------
  block: Set default request_alignment during bdrv_refresh_limits()

We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.

Now that all drivers have been updated to supply an override
of request_alignment during their .bdrv_refresh_limits(), as
needed, the block layer itself can defer setting the default
alignment until part of the overall bdrv_refresh_limits().

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


  Commit: 5def6b80e1eca696c1fc6099e7f4d36729686402
      
https://github.com/qemu/qemu/commit/5def6b80e1eca696c1fc6099e7f4d36729686402
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/block-backend.c
    M block/io.c
    M block/iscsi.c
    M block/nbd.c
    M block/raw-posix.c
    M hw/block/virtio-blk.c
    M hw/scsi/scsi-generic.c
    M include/block/block_int.h
    M include/sysemu/block-backend.h
    M qemu-img.c

  Log Message:
  -----------
  block: Switch transfer length bounds to byte-based

Sector-based limits are awkward to think about; in our on-going
quest to move to byte-based interfaces, convert max_transfer_length
and opt_transfer_length.  Rename them (dropping the _length suffix)
so that the compiler will help us catch the change in semantics
across any rebased code, and improve the documentation.  Use unsigned
values, so that we don't have to worry about negative values and
so that bit-twiddling is easier; however, we are still constrained
by 2^31 of signed int in most APIs.

When a value comes from an external source (iscsi and raw-posix),
sanitize the results to ensure that opt_transfer is a power of 2.

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


  Commit: 29cc6a6834add5cddbc391d07c1b3ace2ad9b8eb
      
https://github.com/qemu/qemu/commit/29cc6a6834add5cddbc391d07c1b3ace2ad9b8eb
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M include/block/block_int.h

  Log Message:
  -----------
  block: Wording tweaks to write zeroes limits

Improve the documentation of the write zeroes limits, to mention
additional constraints that drivers should observe.  Worth squashing
into commit cf081fca, if that hadn't been pushed already :)

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


  Commit: b9f7855a50a7cbf04454fa84e9d1f333151f2259
      
https://github.com/qemu/qemu/commit/b9f7855a50a7cbf04454fa84e9d1f333151f2259
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c
    M block/iscsi.c
    M block/nbd.c
    M include/block/block_int.h
    M qemu-img.c

  Log Message:
  -----------
  block: Switch discard length bounds to byte-based

Sector-based limits are awkward to think about; in our on-going
quest to move to byte-based interfaces, convert max_discard and
discard_alignment.  Rename them, using 'pdiscard' as an aid to
track which remaining discard interfaces need conversion, and so
that the compiler will help us catch the change in semantics
across any rebased code.  The BlockLimits type is now completely
byte-based; and in iscsi.c, sector_limits_lun2qemu() is no
longer needed.

pdiscard_alignment is made unsigned (we use power-of-2 alignments
as bitmasks, where unsigned is easier to think about) while
leaving max_pdiscard signed (since we still have an 'int'
interface); this is comparable to what commit cf081fc did for
write zeroes limits.  We may later want to make everything an
unsigned 64-bit limit - but that requires a bigger code audit.

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


  Commit: ad82be2f4feda6260d499cb923bf2a59d3838493
      
https://github.com/qemu/qemu/commit/ad82be2f4feda6260d499cb923bf2a59d3838493
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/raw_bsd.c

  Log Message:
  -----------
  block: Drop raw_refresh_limits()

The raw block driver was blindly copying all limits from bs->file,
even though: 1. the main bdrv_refresh_limits() already does this
for many of the limits, and 2. blindly copying from the children
can weaken any stricter limits that were already inherited from
the backing chain during the main bdrv_refresh_limits().  Also,
a future patch is about to move .request_alignment into
BlockLimits, and that is a limit that should NOT be copied from
other layers in the BDS chain.

Thus, we can completely drop raw_refresh_limits(), and rely on
the block layer setting up the proper limits.

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


  Commit: d9e0dfa2462e32cc5c6c49401ad7bff36453f75c
      
https://github.com/qemu/qemu/commit/d9e0dfa2462e32cc5c6c49401ad7bff36453f75c
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Split bdrv_merge_limits() from bdrv_refresh_limits()

During bdrv_merge_limits(), we were computing initial limits
based on another BDS in two places.  At first glance, the two
computations are not identical (one is doing straight copying,
the other is doing merging towards or away from zero) - but
when you realize that the first round is starting with all-0
memory, all of the merging happens to work.  Factoring out the
merging makes it easier to track how two BDS limits are merged,
in case we have future reasons to merge in even more limits.

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


  Commit: a5b8dd2ce83208cd7d6eb4562339ecf5aae13574
      
https://github.com/qemu/qemu/commit/a5b8dd2ce83208cd7d6eb4562339ecf5aae13574
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/bochs.c
    M block/cloop.c
    M block/dmg.c
    M block/io.c
    M block/iscsi.c
    M block/qcow2.c
    M block/raw-posix.c
    M block/raw-win32.c
    M block/vvfat.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Move request_alignment into BlockLimit

It makes more sense to have ALL block size limit constraints
in the same struct.  Improve the documentation while at it.

Simplify a couple of conditionals, now that we have audited and
documented that request_alignment is always non-zero.

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


  Commit: 8cc9c6e92bed8459bffaf5a22af8560f2cd8042b
      
https://github.com/qemu/qemu/commit/8cc9c6e92bed8459bffaf5a22af8560f2cd8042b
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  block: Fix error message style

error_setg() is not supposed to be used for multi-sentence
messages; tweak the message to append a hint instead.

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


  Commit: 5411541270f1d9e8eb1fb442fa4908c4398d5d88
      
https://github.com/qemu/qemu/commit/5411541270f1d9e8eb1fb442fa4908c4398d5d88
  Author: Eric Blake <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/bochs.c
    M block/cloop.c
    M block/crypto.c
    M block/dmg.c
    M block/iscsi.c
    M block/qcow.c
    M block/qcow2.c
    M block/vvfat.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Use bool as appropriate for BDS members

Using int for values that are only used as booleans is confusing.
While at it, rearrange a couple of members so that all the bools
are contiguous.

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


  Commit: 1c42f149ddc1ff7dd897ef2696ad662955a5ab2b
      
https://github.com/qemu/qemu/commit/1c42f149ddc1ff7dd897ef2696ad662955a5ab2b
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/linux-aio.c

  Log Message:
  -----------
  block: fix return code for partial write for Linux AIO

Partial write most likely means that there is not space rather than
"something wrong happens". Thus it would be more natural to return
ENOSPC rather than EINVAL.

The problem actually happens with NBD server, which has reported EINVAL
rather then ENOSPC on the first error using its protocol, which makes
report to the user wrong.

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Pavel Borzenkov <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a9d52a75634ac9aa7d101bf7f63e10bf6655a865
      
https://github.com/qemu/qemu/commit/a9d52a75634ac9aa7d101bf7f63e10bf6655a865
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M hw/core/qdev-properties-system.c

  Log Message:
  -----------
  block/qdev: Fix NULL access when using BB twice

BlockBackend has only a single pointer to its guest device, so it makes
sure that only a single guest device is attached to it. device-add
returns an error if you try to attach a second device to a BB. In order
to make the error message nicer, -device that manually connects to a
if=none block device get a different message than -drive that implicitly
creates a guest device. The if=... option is stored in DriveInfo.

However, since blockdev-add exists, not every BlockBackend has a
DriveInfo any more. Check that it exists before we dereference it.

QMP reproducer resulting in a segfault:

{"execute":"blockdev-add","arguments":{"options":{"id":"disk","driver":"file","filename":"/tmp/test.img"}}}
{"execute":"device_add","arguments":{"driver":"virtio-blk-pci","drive":"disk"}}
{"execute":"device_add","arguments":{"driver":"virtio-blk-pci","drive":"disk"}}

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


  Commit: eecc77473b153fbd3700d68802b48fd0fe8ce4bc
      
https://github.com/qemu/qemu/commit/eecc77473b153fbd3700d68802b48fd0fe8ce4bc
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: Use BdrvChild for s->qcow

vvfat uses a temporary qcow file to cache written data in read-write
mode. In order to do things properly, this should show up in the BDS
graph and I/O should go through BdrvChild like for every other node.

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


  Commit: e858a9705c157211382f3738549cb6345d5c065c
      
https://github.com/qemu/qemu/commit/e858a9705c157211382f3738549cb6345d5c065c
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/blkreplay.c

  Log Message:
  -----------
  blkreplay: Convert to byte-based I/O

The blkreplay driver only forwards the requests it gets, so converting
it to byte granularity is trivial.

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


  Commit: db1e80ee2ed6fc9eb6b203873b39752144f5577f
      
https://github.com/qemu/qemu/commit/db1e80ee2ed6fc9eb6b203873b39752144f5577f
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  vhdx: Some more BlockBackend use in vhdx_create()

This does some easy conversions from bdrv_* to blk_* functions in
vhdx_create(). We should avoid bypassing the BlockBackend layer whenever
possible.

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


  Commit: 28b04a8f655820cca2cc1c8fe409462b46d50d41
      
https://github.com/qemu/qemu/commit/28b04a8f655820cca2cc1c8fe409462b46d50d41
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/crypto.c
    M block/io.c
    M block/parallels.c
    M block/qcow.c
    M block/raw_bsd.c
    M block/vhdx.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_co_readv() to BdrvChild

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


  Commit: 25ec177d90de0992f4d4d5be8ab1e02b9fa2bdf1
      
https://github.com/qemu/qemu/commit/25ec177d90de0992f4d4d5be8ab1e02b9fa2bdf1
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/crypto.c
    M block/io.c
    M block/parallels.c
    M block/qcow.c
    M block/vhdx.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_co_writev() to BdrvChild

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


  Commit: ebb7af217339a971bbac91e3697ba76226154a8c
      
https://github.com/qemu/qemu/commit/ebb7af217339a971bbac91e3697ba76226154a8c
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/blkdebug.c
    M block/blkverify.c
    M block/io.c
    M block/qed-table.c
    M block/qed.c
    M block/quorum.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_aio_readv() to BdrvChild

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


  Commit: 0d1049c7d1d4266a587be255ef0b602531c05456
      
https://github.com/qemu/qemu/commit/0d1049c7d1d4266a587be255ef0b602531c05456
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/blkdebug.c
    M block/blkverify.c
    M block/io.c
    M block/qed-table.c
    M block/qed.c
    M block/quorum.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_aio_writev() to BdrvChild

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


  Commit: adad6496c5187a22da00b67b286b8abeab165c96
      
https://github.com/qemu/qemu/commit/adad6496c5187a22da00b67b286b8abeab165c96
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Convert bdrv_co_do_readv/writev to BdrvChild

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


  Commit: 83fd6dd3e77cabf6f5cc9763752628bcc9c99541
      
https://github.com/qemu/qemu/commit/83fd6dd3e77cabf6f5cc9763752628bcc9c99541
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/Makefile.objs
    M block/commit.c

  Log Message:
  -----------
  block: Move bdrv_commit() to block/commit.c

No code changes, just moved from one file to another.

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


  Commit: f8e2bd538d2c7baccbed0f22b02d08290959ba95
      
https://github.com/qemu/qemu/commit/f8e2bd538d2c7baccbed0f22b02d08290959ba95
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  block: Use BlockBackend for I/O in bdrv_commit()

Just like block jobs, the HMP commit command should use its own
BlockBackend for doing I/O on BlockDriverStates.

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


  Commit: fbcbbf4e80a57298c605f4a2b486280d70c69d00
      
https://github.com/qemu/qemu/commit/fbcbbf4e80a57298c605f4a2b486280d70c69d00
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c
    M block/qcow2-cluster.c
    M block/vdi.c
    M block/vvfat.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_read() to BdrvChild

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


  Commit: 18d51c4bac9d96302035de0faa11e3df98358f45
      
https://github.com/qemu/qemu/commit/18d51c4bac9d96302035de0faa11e3df98358f45
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c
    M block/qcow.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/vdi.c
    M block/vvfat.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_write() to BdrvChild

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


  Commit: cf2ab8fc345c34f8671fade9230746610e4fc340
      
https://github.com/qemu/qemu/commit/cf2ab8fc345c34f8671fade9230746610e4fc340
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/bochs.c
    M block/cloop.c
    M block/crypto.c
    M block/dmg.c
    M block/io.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-cache.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qed.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_pread(v) to BdrvChild

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


  Commit: d9ca2ea2e261442c267f542953a5f3243e4f608e
      
https://github.com/qemu/qemu/commit/d9ca2ea2e261442c267f542953a5f3243e4f608e
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qed.c
    M block/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M include/block/block.h

  Log Message:
  -----------
  block: Convert bdrv_pwrite(v/_sync) to BdrvChild

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


  Commit: 720ff280e73ebdc6751a9c5ae741fdcdd092a5a0
      
https://github.com/qemu/qemu/commit/720ff280e73ebdc6751a9c5ae741fdcdd092a5a0
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/block-backend.c
    M block/io.c
    M block/parallels.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M include/block/block.h
    M include/sysemu/block-backend.h
    M qemu-img.c

  Log Message:
  -----------
  block: Convert bdrv_pwrite_zeroes() to BdrvChild

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


  Commit: e293b7a3dff232ddf71e92ea88961b597586911e
      
https://github.com/qemu/qemu/commit/e293b7a3dff232ddf71e92ea88961b597586911e
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: Convert bdrv_prwv_co() to BdrvChild

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


  Commit: a03ef88f77af045a2eb9629b5ce774a3fb973c5e
      
https://github.com/qemu/qemu/commit/a03ef88f77af045a2eb9629b5ce774a3fb973c5e
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/blkreplay.c
    M block/block-backend.c
    M block/bochs.c
    M block/io.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/raw_bsd.c
    M block/vdi.c
    M block/vmdk.c
    M block/vpc.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Convert bdrv_co_preadv/pwritev to BdrvChild

This is the final patch for converting the common I/O path to take
a BdrvChild parameter instead of BlockDriverState.

The completion of this conversion means that all users that perform I/O
on an image need to actually hold a reference (in the form of BdrvChild,
possible as part of a BlockBackend) to that image. This also protects
against inconsistent use of BlockBackend vs. BlockDriverState functions
because direct use of a BlockDriverState isn't possible any more and
blk->root is private for block-backends.c.

In addition, we can now distinguish different users in the I/O path,
and the future op blockers work is going to add assertions based on
permissions stored in BdrvChild.

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


  Commit: f1f7a1ddf38f4261058c604c32c488a0b7af9814
      
https://github.com/qemu/qemu/commit/f1f7a1ddf38f4261058c604c32c488a0b7af9814
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.c

  Log Message:
  -----------
  block/qcow2: Don't use cpu_to_*w()

Don't use the cpu_to_*w() functions, which we are trying to deprecate.
Instead either just use cpu_to_*() to do the byteswap, or use
st*_be_p() if we need to do the store somewhere other than to a
variable that's already the correct type.

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


  Commit: b0aaca4d7ff6f03acb9b2c0bc2f0d89267cc5dce
      
https://github.com/qemu/qemu/commit/b0aaca4d7ff6f03acb9b2c0bc2f0d89267cc5dce
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.c

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

A block patch for the block queue

# gpg: Signature made Tue Jul  5 16:54:22 2016 CEST
# gpg:                using RSA key 0x3BB14202E838ACAD
# gpg: Good signature from "Max Reitz <address@hidden>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40
#      Subkey fingerprint: 58B3 81CE 2DC8 9CF9 9730  EE64 3BB1 4202 E838 ACAD

* mreitz/tags/pull-block-for-kevin-2016-07-05-v2:
  block/qcow2: Don't use cpu_to_*w()

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


  Commit: 07bee7f4f45e2f956ce566336854b46a74faa2fe
      
https://github.com/qemu/qemu/commit/07bee7f4f45e2f956ce566336854b46a74faa2fe
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-05 (Tue, 05 Jul 2016)

  Changed paths:
    M block.c
    M block/Makefile.objs
    M block/blkdebug.c
    M block/blkreplay.c
    M block/blkverify.c
    M block/block-backend.c
    M block/bochs.c
    M block/cloop.c
    M block/commit.c
    M block/crypto.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.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2-cache.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qed-table.c
    M block/qed.c
    M block/quorum.c
    M block/raw-posix.c
    M block/raw-win32.c
    M block/raw_bsd.c
    M block/vdi.c
    M block/vhdx-log.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M hw/block/virtio-blk.c
    M hw/core/qdev-properties-system.c
    M hw/scsi/scsi-generic.c
    M include/block/block.h
    M include/block/block_int.h
    M include/block/nbd.h
    M include/sysemu/block-backend.h
    M qapi/block-core.json
    M qemu-img.c

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

Block layer patches

# gpg: Signature made Tue 05 Jul 2016 16:46:14 BST
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream: (43 commits)
  block/qcow2: Don't use cpu_to_*w()
  block: Convert bdrv_co_preadv/pwritev to BdrvChild
  block: Convert bdrv_prwv_co() to BdrvChild
  block: Convert bdrv_pwrite_zeroes() to BdrvChild
  block: Convert bdrv_pwrite(v/_sync) to BdrvChild
  block: Convert bdrv_pread(v) to BdrvChild
  block: Convert bdrv_write() to BdrvChild
  block: Convert bdrv_read() to BdrvChild
  block: Use BlockBackend for I/O in bdrv_commit()
  block: Move bdrv_commit() to block/commit.c
  block: Convert bdrv_co_do_readv/writev to BdrvChild
  block: Convert bdrv_aio_writev() to BdrvChild
  block: Convert bdrv_aio_readv() to BdrvChild
  block: Convert bdrv_co_writev() to BdrvChild
  block: Convert bdrv_co_readv() to BdrvChild
  vhdx: Some more BlockBackend use in vhdx_create()
  blkreplay: Convert to byte-based I/O
  vvfat: Use BdrvChild for s->qcow
  block/qdev: Fix NULL access when using BB twice
  block: fix return code for partial write for Linux AIO
  ...

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


Compare: https://github.com/qemu/qemu/compare/791b7d2340cf...07bee7f4f45e

reply via email to

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