qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 293380: stream: Fix prototype of stream_start


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 293380: stream: Fix prototype of stream_start()
Date: Thu, 14 Jul 2016 05:30:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 29338003c93c3e81ea00f7b45baeee379fa83aa5
      
https://github.com/qemu/qemu/commit/29338003c93c3e81ea00f7b45baeee379fa83aa5
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M include/block/block_int.h

  Log Message:
  -----------
  stream: Fix prototype of stream_start()

'stream-start' has a parameter called 'backing-file', which is the
string to be written to bs->backing when the job finishes.

In the stream_start() implementation it is called 'backing_file_str',
but it the prototype in the header file it is called 'base_id'.

This patch fixes it so the name is the same in both cases and is
consistent with other cases (like commit_start()).

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


  Commit: 9df229c3caf6559a37c8760ef6e1485e66bbae41
      
https://github.com/qemu/qemu/commit/9df229c3caf6559a37c8760ef6e1485e66bbae41
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/mirror.c
    M blockjob.c
    M include/block/blockjob.h
    M include/qapi/qmp/qerror.h

  Log Message:
  -----------
  blockjob: Update description of the 'id' field

The 'id' field of the BlockJob structure will be able to hold any ID,
not only a device name. This patch updates the description of that
field and the error messages where it is being used.

Soon we'll add the ability to set an arbitrary ID when creating a
block job.

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


  Commit: ffb1f10cd1118393627e1bd2dad0a68152d2e539
      
https://github.com/qemu/qemu/commit/ffb1f10cd1118393627e1bd2dad0a68152d2e539
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  blockjob: Add block_job_get()

Currently the way to look for a specific block job is to iterate the
list manually using block_job_next().

Since we want to be able to identify a job primarily by its ID it
makes sense to have a function that does just that.

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


  Commit: 3ddf3efefa364505ee44582873612dd8f6abb838
      
https://github.com/qemu/qemu/commit/3ddf3efefa364505ee44582873612dd8f6abb838
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Use block_job_get() in find_block_job()

find_block_job() looks for a block backend with a specified name,
checks whether it has a block job and acquires its AioContext.

We want to identify jobs by their ID and not by the block backend
they're attached to, so this patch ignores the backends altogether and
gets the job directly. Apart from making the code simpler, this will
allow us to find block jobs once they start having user-specified IDs.

To ensure backward compatibility we keep ERROR_CLASS_DEVICE_NOT_ACTIVE
as the error class if the job doesn't exist. In subsequent patches
we'll also need to keep the device name as the default job ID if the
user doesn't specify a different one.

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


  Commit: 7f0317cfc8da620cdb38cb5cfec5f82b8dd05403
      
https://github.com/qemu/qemu/commit/7f0317cfc8da620cdb38cb5cfec5f82b8dd05403
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/backup.c
    M block/commit.c
    M block/mirror.c
    M block/stream.c
    M blockjob.c
    M include/block/blockjob.h
    M tests/test-blockjob-txn.c

  Log Message:
  -----------
  blockjob: Add 'job_id' parameter to block_job_create()

When a new job is created, the job ID is taken from the device name of
the BDS. This patch adds a new 'job_id' parameter to let the caller
provide one instead.

This patch also verifies that the ID is always unique and well-formed.
This causes problems in a couple of places where no ID is being set,
because the BDS does not have a device name.

In the case of test_block_job_start() (from test-blockjob-txn.c) we
can simply use this new 'job_id' parameter to set the missing ID.

In the case of img_commit() (from qemu-img.c) we still don't have the
API to make commit_active_start() set the job ID, so we solve it by
setting a default value. We'll get rid of this as soon as we extend
the API.

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


  Commit: 71aa98678c2b5616de5453d55e12f8ea810fbefb
      
https://github.com/qemu/qemu/commit/71aa98678c2b5616de5453d55e12f8ea810fbefb
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'

This patch adds a new optional 'job-id' parameter to 'blockdev-mirror'
and 'drive-mirror', allowing the user to specify the ID of the block
job to be created.

The HMP 'drive_mirror' command remains unchanged.

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


  Commit: 70559d499c84b9c7b1874821f970a15d52460d64
      
https://github.com/qemu/qemu/commit/70559d499c84b9c7b1874821f970a15d52460d64
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

This patch adds a new optional 'job-id' parameter to 'blockdev-backup'
and 'drive-backup', allowing the user to specify the ID of the block
job to be created.

The HMP 'drive_backup' command remains unchanged.

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


  Commit: 2323322ed060749b52864836f6fcb1a906baf95d
      
https://github.com/qemu/qemu/commit/2323322ed060749b52864836f6fcb1a906baf95d
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  stream: Add 'job-id' parameter to 'block-stream'

This patch adds a new optional 'job-id' parameter to 'block-stream',
allowing the user to specify the ID of the block job to be created.

The HMP 'block_stream' command remains unchanged.

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


  Commit: fd62c609edb32ddaafbe84c466dd21603577a46d
      
https://github.com/qemu/qemu/commit/fd62c609edb32ddaafbe84c466dd21603577a46d
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  commit: Add 'job-id' parameter to 'block-commit'

This patch adds a new optional 'job-id' parameter to 'block-commit',
allowing the user to specify the ID of the block job to be created.

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


  Commit: a5d5a3bdbd4bd2ffb27f825dd8a39e1fbaf11ad3
      
https://github.com/qemu/qemu/commit/a5d5a3bdbd4bd2ffb27f825dd8a39e1fbaf11ad3
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M blockjob.c
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Set the ID of the block job in img_commit()

img_commit() creates a block job without an ID. This is no longer
allowed now that we require it to be unique and well-formed. We were
solving this by having a fallback in block_job_create(), but now that
we extended the API of commit_active_start() we can finally set an
explicit ID and revert that change.

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


  Commit: 6aae5be6a77e36968c0f6cc2ab147918904087b7
      
https://github.com/qemu/qemu/commit/6aae5be6a77e36968c0f6cc2ab147918904087b7
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  blockjob: Update description of the 'device' field in the QMP API

The 'device' field in all BLOCK_JOB_* events and 'block-job-*' command
is no longer the device name, but the ID of the job. This patch
updates the documentation to clarify that.

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


  Commit: 761d1ddf25988eeb110a612b0a42945fa1b561a5
      
https://github.com/qemu/qemu/commit/761d1ddf25988eeb110a612b0a42945fa1b561a5
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  osdep: Introduce qemu_dup

And use it in qemu_dup_flags.

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


  Commit: 5af7045bd0d45cff5c8eb0a3b14b900d9bd24998
      
https://github.com/qemu/qemu/commit/5af7045bd0d45cff5c8eb0a3b14b900d9bd24998
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  raw-posix: Use qemu_dup

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


  Commit: 7d9c8581370738fb3877a724ac061e6a8cd00121
      
https://github.com/qemu/qemu/commit/7d9c8581370738fb3877a724ac061e6a8cd00121
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M include/qemu/coroutine.h
    M include/qemu/coroutine_int.h
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: use QSIMPLEQ instead of QTAILQ

CoQueue do not need to remove any element but the head of the list;
processing is always strictly FIFO.  Therefore, the simpler singly-linked
QSIMPLEQ can be used instead.

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


  Commit: 7e70cdba9f220bef3f3481c663c066c2b80469aa
      
https://github.com/qemu/qemu/commit/7e70cdba9f220bef3f3481c663c066c2b80469aa
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M tests/test-coroutine.c

  Log Message:
  -----------
  test-coroutine: prepare for the next patch

The next patch moves the coroutine argument from first-enter to
creation time.  In this case, coroutine has not been initialized
yet when the coroutine is created, so change to a pointer.

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


  Commit: 0b8b8753e4d94901627b3e86431230f2319215c4
      
https://github.com/qemu/qemu/commit/0b8b8753e4d94901627b3e86431230f2319215c4
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block.c
    M block/backup.c
    M block/blkdebug.c
    M block/blkreplay.c
    M block/block-backend.c
    M block/commit.c
    M block/gluster.c
    M block/io.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/mirror.c
    M block/nbd-client.c
    M block/nfs.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/sheepdog.c
    M block/ssh.c
    M block/stream.c
    M block/vmdk.c
    M blockjob.c
    M hw/9pfs/9p.c
    M hw/9pfs/coth.c
    M include/qemu/coroutine.h
    M include/qemu/main-loop.h
    M io/channel.c
    M migration/migration.c
    M nbd/server.c
    M qemu-io-cmds.c
    M tests/test-blockjob-txn.c
    M tests/test-coroutine.c
    M tests/test-thread-pool.c
    M thread-pool.c
    M util/qemu-coroutine-io.c
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine-sleep.c
    M util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: move entry argument to qemu_coroutine_create

In practice the entry argument is always known at creation time, and
it is confusing that sometimes qemu_coroutine_enter is used with a
non-NULL argument to re-enter a coroutine (this happens in
block/sheepdog.c and tests/test-coroutine.c).  So pass the opaque value
at creation time, for consistency with e.g. aio_bh_new.

Mostly done with the following semantic patch:

@ entry1 @
expression entry, arg, co;
@@
- co = qemu_coroutine_create(entry);
+ co = qemu_coroutine_create(entry, arg);
  ...
- qemu_coroutine_enter(co, arg);
+ qemu_coroutine_enter(co);

@ entry2 @
expression entry, arg;
identifier co;
@@
- Coroutine *co = qemu_coroutine_create(entry);
+ Coroutine *co = qemu_coroutine_create(entry, arg);
  ...
- qemu_coroutine_enter(co, arg);
+ qemu_coroutine_enter(co);

@ entry3 @
expression entry, arg;
@@
- qemu_coroutine_enter(qemu_coroutine_create(entry), arg);
+ qemu_coroutine_enter(qemu_coroutine_create(entry, arg));

@ reentry @
expression co;
@@
- qemu_coroutine_enter(co, NULL);
+ qemu_coroutine_enter(co);

except for the aforementioned few places where the semantic patch
stumbled (as expected) and for test_co_queue, which would otherwise
produce an uninitialized variable warning.

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


  Commit: 8daea510951dd309a44cea8de415c685c43851cf
      
https://github.com/qemu/qemu/commit/8daea510951dd309a44cea8de415c685c43851cf
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  block/qdev: Allow node name for drive properties

If a node name instead of a BlockBackend name is specified as the driver
for a guest device, an anonymous BlockBackend is created now.

The order of operations in release_drive() must be reversed in order to
avoid a use-after-free bug because now blk_detach_dev() frees the last
reference if an anonymous BlockBackend is used.

usb-storage uses a hack where it forwards its BlockBackend as a property
to another device that it internally creates. This hack must be updated
so that it doesn't drop its original BB before it can be passed to the
other device. This used to work because we always had the monitor
reference around, but with node-names the device reference is the only
one now.

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


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

  Changed paths:
    M hw/block/block.c
    M hw/block/nvme.c
    M hw/block/virtio-blk.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M hw/usb/dev-storage.c
    M include/hw/block/block.h

  Log Message:
  -----------
  block/qdev: Allow configuring WCE with qdev properties

As cache.writeback is a BlockBackend property and as such more related
to the guest device than the BlockDriverState, we already removed it
from the blockdev-add interface. This patch adds the new way to set it,
as a qdev property of the corresponding guest device.

For example: -drive if=none,file=test.img,node-name=img
       -device ide-hd,drive=img,write-cache=off

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


  Commit: 1e8fb7f1ee1ba902ab06cb8d54eca006c3b45f42
      
https://github.com/qemu/qemu/commit/1e8fb7f1ee1ba902ab06cb8d54eca006c3b45f42
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Fix use of error handling policy

Commit implemented the 'enospc' policy as 'ignore' if the error was not
ENOSPC. The QAPI documentation promises that it's treated as 'stop'.
Using the common block job error handling function fixes this and also
adds the missing QMP event.

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


  Commit: 8c39825218227c0d63709708602d34c4355bad56
      
https://github.com/qemu/qemu/commit/8c39825218227c0d63709708602d34c4355bad56
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/block-backend.c
    M blockjob.c
    M hw/block/block.c
    M hw/block/virtio-blk.c
    M hw/core/qdev-properties.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M include/hw/block/block.h
    M include/hw/qdev-properties.h
    M qapi/block-core.json

  Log Message:
  -----------
  block/qdev: Allow configuring rerror/werror with qdev properties

The rerror/werror policies are implemented in the devices, so that's
where they should be configured. In comparison to the old options in
-drive, the qdev properties are only added to those devices that
actually support them.

If the option isn't given (or "auto" is specified), the setting of the
BlockBackend is used for compatibility with the old options. For block
jobs, "auto" is the same as "enospc".

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


  Commit: 62ed9fa991488b5ed6b8a2cbcb64182d7a5378f5
      
https://github.com/qemu/qemu/commit/62ed9fa991488b5ed6b8a2cbcb64182d7a5378f5
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  qemu-iotests: Test setting WCE with qdev

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


  Commit: 35fedb7b0e5766fc62a2c0bdce023b50dc5e3ffc
      
https://github.com/qemu/qemu/commit/35fedb7b0e5766fc62a2c0bdce023b50dc5e3ffc
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  block: Remove BB options from blockdev-add

werror/rerror are now available as qdev options. The stats-* options are
removed without an existing replacement; they should probably be
configurable with a separate QMP command like I/O throttling settings.

Removing id is left for another day because this involves updating
qemu-iotests cases to use node-name for everything. Before we can do
that, however, all QMP commands must support node-name.

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


  Commit: bcf23482ae00e040dbef46c44ff914bf788a0937
      
https://github.com/qemu/qemu/commit/bcf23482ae00e040dbef46c44ff914bf788a0937
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Use strerror() for generic resize error

Emitting the plain error number is not very helpful. Use strerror()
instead.

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


  Commit: 84c26520d3c1c9ff4a10455748139463278816d5
      
https://github.com/qemu/qemu/commit/84c26520d3c1c9ff4a10455748139463278816d5
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Avoid making the L1 table too big

We refuse to open images whose L1 table we deem "too big". Consequently,
we should not produce such images ourselves.

Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
[mreitz: Added QEMU_BUILD_BUG_ON()]
Signed-off-by: Max Reitz <address@hidden>


  Commit: a367467995d0528fe591d87ca2e437c7b7d7951b
      
https://github.com/qemu/qemu/commit/a367467995d0528fe591d87ca2e437c7b7d7951b
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M qemu-io-cmds.c

  Log Message:
  -----------
  qemu-io: Use correct range limitations

create_iovec() has a comment lamenting the lack of SIZE_T_MAX. Since
there actually is a SIZE_MAX, use it.

Two places use INT_MAX for checking the upper bound of a sector count
that is used as an argument for a blk_*() function (blk_discard() and
blk_write_compressed(), respectively). BDRV_REQUEST_MAX_SECTORS should
be used instead.

And finally, do_co_pwrite_zeroes() used to similarly check that the
sector count does not exceed INT_MAX. However, this function is now
backed by blk_co_pwrite_zeroes() which takes bytes as an argument
instead of sectors. Therefore, it should be the byte count that does not
exceed INT_MAX, not the sector count.

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


  Commit: c834cba90521576224c30b15ebb4d6aeab7b42c4
      
https://github.com/qemu/qemu/commit/c834cba90521576224c30b15ebb4d6aeab7b42c4
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Fix qcow2_get_cluster_offset()

Recently, qcow2_get_cluster_offset() has been changed to work with bytes
instead of sectors. This invalidated some assertions and introduced a
possible integer multiplication overflow.

This could be reproduced using e.g.

$ qemu-img create -f qcow2 -o cluster_size=1M blub.qcow2 8G
Formatting 'foo.qcow2', fmt=qcow2 size=8589934592 encryption=off
cluster_size=1048576 lazy_refcounts=off refcount_bits=16
$ qemu-io -c map blub.qcow2
qemu-io: qemu/block/qcow2-cluster.c:504: qcow2_get_cluster_offset:
Assertion `bytes_needed <= INT_MAX' failed.
[1]    20775 abort (core dumped)  qemu-io -c map foo.qcow2

This patch removes the now wrong assertion, adding comments and more
assertions to prove its correctness (and fixing the overflow which would
become apparent with the original assertion removed).

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


  Commit: f14a39ccb922ee123741ae2cf70a10eef9a650fc
      
https://github.com/qemu/qemu/commit/f14a39ccb922ee123741ae2cf70a10eef9a650fc
  Author: Sascha Silbe <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/commit.c
    M block/mirror.c
    M block/stream.c
    M include/qemu/ratelimit.h

  Log Message:
  -----------
  Improve block job rate limiting for small bandwidth values

ratelimit_calculate_delay() previously reset the accounting every time
slice, no matter how much data had been processed before. This had (at
least) two consequences:

1. The minimum speed is rather large, e.g. 5 MiB/s for commit and stream.

   Not sure if there are real-world use cases where this would be a
   problem. Mirroring and backup over a slow link (e.g. DSL) would
   come to mind, though.

2. Tests for block job operations (e.g. cancel) were rather racy

   All block jobs currently use a time slice of 100ms. That's a
   reasonable value to get smooth output during regular
   operation. However this also meant that the state of block jobs
   changed every 100ms, no matter how low the configured limit was. On
   busy hosts, qemu often transferred additional chunks until the test
   case had a chance to cancel the job.

Fix the block job rate limit code to delay for more than one time
slice to address the above issues. To make it easier to handle
oversized chunks we switch the semantics from returning a delay
_before_ the current request to a delay _after_ the current
request. If necessary, this delay consists of multiple time slice
units.

Since the mirror job sends multiple chunks in one go even if the rate
limit was exceeded in between, we need to keep track of the start of
the current time slice so we can correctly re-compute the delay for
the updated amount of data.

The minimum bandwidth now is 1 data unit per time slice. The block
jobs are currently passing the amount of data transferred in sectors
and using 100ms time slices, so this translates to 5120
bytes/second. With chunk sizes usually being O(512KiB), tests have
plenty of time (O(100s)) to operate on block jobs. The chance of a
race condition now is fairly remote, except possibly on insanely
loaded systems.

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


  Commit: 524089bce43fd1cd3daaca979872451efa2cf7c6
      
https://github.com/qemu/qemu/commit/524089bce43fd1cd3daaca979872451efa2cf7c6
  Author: Reda Sallahi <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: fix metadata write regression

Commit "cdeaf1f vmdk: add bdrv_co_write_zeroes" causes a regression on
writes. It writes metadata after every write instead of doing it only once
for each cluster.

vmdk_pwritev() writes metadata whenever m_data is set as valid so this patch
sets m_data as valid only when we have a new cluster which hasn't been
allocated before or a zero grain.

Signed-off-by: Reda Sallahi <address@hidden>
Message-id: address@hidden
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: ff356ee4da0a2e691a7ab0165d47279f868977c4
      
https://github.com/qemu/qemu/commit/ff356ee4da0a2e691a7ab0165d47279f868977c4
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Fix regression with the default naming of throttling groups

When I/O limits are set for a block device, the name of the throttling
group is taken from the BlockBackend if the user doesn't specify one.

Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in
blockdev_init() to the end of the function, after I/O limits are set.
The consequence is that the throttling group gets an empty name.

Signed-off-by: Alberto Garcia <address@hidden>
Reported-by: Stefan Hajnoczi <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Message-id: address@hidden
[mreitz: Use existing "id" variable instead of new "blk_id"]
Signed-off-by: Max Reitz <address@hidden>


  Commit: 435d5ee6cd3fd7aa0f16748c03648ed97b493c2b
      
https://github.com/qemu/qemu/commit/435d5ee6cd3fd7aa0f16748c03648ed97b493c2b
  Author: Alberto Garcia <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  qemu-iotests: Test naming of throttling groups

Throttling groups are named using the 'group' parameter of the
block_set_io_throttle command and the throttling.group command-line
option. If that parameter is unspecified the groups get the name of
the block device.

This patch adds a new test to check the naming of throttling groups.

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 3a1ee711904f12f601fffca31a1050d39f833487
      
https://github.com/qemu/qemu/commit/3a1ee711904f12f601fffca31a1050d39f833487
  Author: Lin Ma <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  hmp: use snapshot name to determine whether a snapshot is 'fully available'

Currently qemu uses snapshot id to determine whether a snapshot is fully
available, It causes incorrect output in some scenario.

For instance:
(qemu) info block
drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2
(qcow2)
    Cache mode:       writeback

drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow2
(qcow2)
    Cache mode:       writeback
(qemu)
(qemu) info snapshots
There is no snapshot available.
(qemu)
(qemu) snapshot_blkdev_internal drive_image1 snap1
(qemu)
(qemu) info snapshots
There is no suitable snapshot available
(qemu)
(qemu) savevm checkpoint-1
(qemu)
(qemu) info snapshots
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         snap1                     0 2016-05-22 16:57:31   00:01:30.567
(qemu)

$ qemu-img snapshot -l disk0.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         snap1                     0 2016-05-22 16:57:31   00:01:30.567
2         checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813

$ qemu-img snapshot -l disk1.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         checkpoint-1              0 2016-05-22 16:58:07   00:02:06.813

The patch uses snapshot name instead of snapshot id to determine whether a
snapshot is fully available and uses '--' instead of snapshot id in output
because the snapshot id is not guaranteed to be the same on all images.
For instance:
(qemu) info snapshots
List of snapshots present on all disks:
 ID        TAG                 VM SIZE                DATE       VM CLOCK
 --        checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813

Signed-off-by: Lin Ma <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 0c204cc810af90ca2a449d08d9d39ec8b760d9b4
      
https://github.com/qemu/qemu/commit/0c204cc810af90ca2a449d08d9d39ec8b760d9b4
  Author: Lin Ma <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  hmp: show all of snapshot info on every block dev in output of 'info 
snapshots'

Currently, the output of 'info snapshots' shows fully available snapshots.
It's opaque, hides some snapshot information to users. It's not convenient
if users want to know more about all of snapshot information on every block
device via monitor.

Follow Kevin's and Max's proposals, The patch makes the output more detailed:
(qemu) info snapshots
List of snapshots present on all disks:
 ID        TAG                 VM SIZE                DATE       VM CLOCK
 --        checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813

List of partial (non-loadable) snapshots on 'drive_image1':
 ID        TAG                 VM SIZE                DATE       VM CLOCK
 1         snap1                     0 2016-05-22 16:57:31   00:01:30.567

Signed-off-by: Lin Ma <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: c4b48bfdc59caf0a69b7e0a40c9ea6d3d7848bc3
      
https://github.com/qemu/qemu/commit/c4b48bfdc59caf0a69b7e0a40c9ea6d3d7848bc3
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: Fix qcow write target driver specification

First, bdrv_open_child() expects all options for the child to be
prefixed by the child's name (and a separating dot). Second,
bdrv_open_child() does not take ownership of the QDict passed to it but
only extracts all options for the child, so if a QDict is created for
the sole purpose of passing it to bdrv_open_child(), it needs to be
freed afterwards.

This patch makes vvfat adhere to both of these rules.

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


  Commit: 42190dcc70b34d59c81d72f1f8ff884aa27dd851
      
https://github.com/qemu/qemu/commit/42190dcc70b34d59c81d72f1f8ff884aa27dd851
  Author: Max Reitz <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

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

  Log Message:
  -----------
  iotests: Make 157 actually format-agnostic

iotest 157 pretends not to care about the image format used, but in fact
it does due to the format name not being filtered in its output. This
patch adds filtering and changes the reference output accordingly.

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


  Commit: 543d7a42baf39c09db754ba9eca1d386e5958110
      
https://github.com/qemu/qemu/commit/543d7a42baf39c09db754ba9eca1d386e5958110
  Author: Kevin Wolf <address@hidden>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M block/commit.c
    M block/mirror.c
    M block/qcow2-cluster.c
    M block/stream.c
    M block/vmdk.c
    M block/vvfat.c
    M blockdev.c
    M include/qemu/ratelimit.h
    M migration/savevm.c
    M qemu-img.c
    M qemu-io-cmds.c
    M tests/qemu-iotests/093
    M tests/qemu-iotests/093.out
    M tests/qemu-iotests/157
    M tests/qemu-iotests/157.out

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

Block patches (v2) for the block queue.

# gpg: Signature made Wed Jul 13 13:41:53 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-13:
  iotests: Make 157 actually format-agnostic
  vvfat: Fix qcow write target driver specification
  hmp: show all of snapshot info on every block dev in output of 'info 
snapshots'
  hmp: use snapshot name to determine whether a snapshot is 'fully available'
  qemu-iotests: Test naming of throttling groups
  blockdev: Fix regression with the default naming of throttling groups
  vmdk: fix metadata write regression
  Improve block job rate limiting for small bandwidth values
  qcow2: Fix qcow2_get_cluster_offset()
  qemu-io: Use correct range limitations
  qcow2: Avoid making the L1 table too big
  qemu-img: Use strerror() for generic resize error

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


  Commit: 9358450e98ed4a5350df4754863d116ff2e6186c
      
https://github.com/qemu/qemu/commit/9358450e98ed4a5350df4754863d116ff2e6186c
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-14 (Thu, 14 Jul 2016)

  Changed paths:
    M block.c
    M block/backup.c
    M block/blkdebug.c
    M block/blkreplay.c
    M block/block-backend.c
    M block/commit.c
    M block/gluster.c
    M block/io.c
    M block/iscsi.c
    M block/linux-aio.c
    M block/mirror.c
    M block/nbd-client.c
    M block/nfs.c
    M block/qcow.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/qed.c
    M block/raw-posix.c
    M block/sheepdog.c
    M block/ssh.c
    M block/stream.c
    M block/vmdk.c
    M block/vvfat.c
    M blockdev.c
    M blockjob.c
    M docs/qmp-events.txt
    M hmp.c
    M hw/9pfs/9p.c
    M hw/9pfs/coth.c
    M hw/block/block.c
    M hw/block/nvme.c
    M hw/block/virtio-blk.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M hw/usb/dev-storage.c
    M include/block/block_int.h
    M include/block/blockjob.h
    M include/hw/block/block.h
    M include/hw/qdev-properties.h
    M include/qapi/qmp/qerror.h
    M include/qemu/coroutine.h
    M include/qemu/coroutine_int.h
    M include/qemu/main-loop.h
    M include/qemu/osdep.h
    M include/qemu/ratelimit.h
    M io/channel.c
    M migration/migration.c
    M migration/savevm.c
    M nbd/server.c
    M qapi/block-core.json
    M qemu-img.c
    M qemu-io-cmds.c
    M qmp-commands.hx
    M tests/qemu-iotests/093
    M tests/qemu-iotests/093.out
    A tests/qemu-iotests/157
    A tests/qemu-iotests/157.out
    M tests/qemu-iotests/group
    M tests/test-blockjob-txn.c
    M tests/test-coroutine.c
    M tests/test-thread-pool.c
    M thread-pool.c
    M util/osdep.c
    M util/qemu-coroutine-io.c
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine-sleep.c
    M util/qemu-coroutine.c

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

Block layer patches

# gpg: Signature made Wed 13 Jul 2016 12:46:17 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: (34 commits)
  iotests: Make 157 actually format-agnostic
  vvfat: Fix qcow write target driver specification
  hmp: show all of snapshot info on every block dev in output of 'info 
snapshots'
  hmp: use snapshot name to determine whether a snapshot is 'fully available'
  qemu-iotests: Test naming of throttling groups
  blockdev: Fix regression with the default naming of throttling groups
  vmdk: fix metadata write regression
  Improve block job rate limiting for small bandwidth values
  qcow2: Fix qcow2_get_cluster_offset()
  qemu-io: Use correct range limitations
  qcow2: Avoid making the L1 table too big
  qemu-img: Use strerror() for generic resize error
  block: Remove BB options from blockdev-add
  qemu-iotests: Test setting WCE with qdev
  block/qdev: Allow configuring rerror/werror with qdev properties
  commit: Fix use of error handling policy
  block/qdev: Allow configuring WCE with qdev properties
  block/qdev: Allow node name for drive properties
  coroutine: move entry argument to qemu_coroutine_create
  test-coroutine: prepare for the next patch
  ...

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


Compare: https://github.com/qemu/qemu/compare/5bb2399f9b08...9358450e98ed

reply via email to

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