qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7db168: block: fix qemu-img --help invocation


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 7db168: block: fix qemu-img --help invocation
Date: Fri, 02 May 2014 04:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7db1689c35a6f7477c691c31232ec10725ba9dfe
      
https://github.com/qemu/qemu/commit/7db1689c35a6f7477c691c31232ec10725ba9dfe
  Author: Jeff Cody <address@hidden>
  Date:   2014-04-28 (Mon, 28 Apr 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  block: fix qemu-img --help invocation

This fixes a bug introduced in commit ac1307ab, that caused the
'--help' option to not be recognized as a valid command, and not
print any help.

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


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

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Use DIV_ROUND_UP

Although bdrv_getlength() was just called above this, and checked for
error, it is better to just use the value we already get, and use
DIV_ROUND_UP.

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


  Commit: 5f6979cba9f63480d38e9deb72b565c6781ac0e8
      
https://github.com/qemu/qemu/commit/5f6979cba9f63480d38e9deb72b565c6781ac0e8
  Author: Jeff Cody <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  block: Add '--version' option to qemu-img

This allows qemu-img to print out version information, without
needing to print the long help wall of text.

While there, perform some minor whitespace cleanup, and remove the
unused option_index variable in the call to getopt_long().

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


  Commit: e855e4fb7b97f7f605e1f44427b98022e39e6f8f
      
https://github.com/qemu/qemu/commit/e855e4fb7b97f7f605e1f44427b98022e39e6f8f
  Author: Jeff Cody <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Ignore duplicate or NULL format_name in bdrv_iterate_format

Some block drivers have multiple BlockDriver instances with identical
format_name fields (e.g. gluster, nbd).

Both qemu-img and qemu will use bdrv_iterate_format() to list the
supported formats when a help option is invoked.  As protocols and
formats may register multiple drivers, redundant listings of formats
occur (e.g., "Supported formats: ... gluster gluster gluster gluster ...
").

Since the list of driver formats will be small, this performs a simple
linear search on format_name, and ignores any duplicates.

The end result change is that the iterator will no longer receive
duplicate string names, nor will it receive NULL pointers.

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


  Commit: 373df5b135b4a54e0abb394e9e703fef3ded093c
      
https://github.com/qemu/qemu/commit/373df5b135b4a54e0abb394e9e703fef3ded093c
  Author: Fam Zheng <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Fix resource leak when bdrv_getlength fails

The direct return will skip releasing of all the resouces at
immediate_exit, don't miss that.

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


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

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Check for bdrv_get_info result

bdrv_get_info could fail. Add check before using the returned value.

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


  Commit: c55752745536712f778e9a0d73a078bdb0360df2
      
https://github.com/qemu/qemu/commit/c55752745536712f778e9a0d73a078bdb0360df2
  Author: Jeff Cody <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

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

  Log Message:
  -----------
  block: qemu-iotests - fix image cleanup when using spaced pathnames

The _rm_test_img() function in common.rc did not quote the image
file, which left droppings in the scratch directory (and performed
a potentially unsafe rm -f).

This adds the necessary quotes.

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


  Commit: cc8a7e560ca7932bacabc8a7113ac73976917848
      
https://github.com/qemu/qemu/commit/cc8a7e560ca7932bacabc8a7113ac73976917848
  Author: Jeff Cody <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

  Changed paths:
    M tests/qemu-iotests/019
    M tests/qemu-iotests/086

  Log Message:
  -----------
  block: qemu-iotests: make test 019 and 086 work with spaced pathnames

Both tests 019 and 086 need proper quotations to work with pathnames
that contain spaces.

Reviewed-by: Benoit Canet <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c883db0df9dbf26471c1418a632b216b0c1104f1
      
https://github.com/qemu/qemu/commit/c883db0df9dbf26471c1418a632b216b0c1104f1
  Author: Max Reitz <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Fix discard

discard_single_l2() should not implement its own version of
qcow2_get_cluster_type(), but rather rely on this already existing
function. By doing so, it will work for compressed clusters as well
(which it did not so far).

Also, rename "old_offset" to "old_l2_entry", as both are quite different
(and the value is indeed of the latter kind).

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


  Commit: cffb12051a26e5494ed009c99db7858b2aab7099
      
https://github.com/qemu/qemu/commit/cffb12051a26e5494ed009c99db7858b2aab7099
  Author: Max Reitz <address@hidden>
  Date:   2014-04-29 (Tue, 29 Apr 2014)

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

  Log Message:
  -----------
  iotests: Discarding compressed clusters on qcow2

Add a test which discards a compressed cluster on qcow2. This should
work without any problems.

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


  Commit: 0b50cc885381fc6794590dbbb40665e32f9292f8
      
https://github.com/qemu/qemu/commit/0b50cc885381fc6794590dbbb40665e32f9292f8
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Create bdrv_inherited_flags()

Instead of having bdrv_open_flags() as a function that creates flags for
several unrelated places and then adding open-coded flags on top, create
a new function that derives the flags for bs->file from the flags for bs.

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


  Commit: 317fc44ef2bfa87e96adecf035ed136ed9d78c8f
      
https://github.com/qemu/qemu/commit/317fc44ef2bfa87e96adecf035ed136ed9d78c8f
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Create bdrv_backing_flags()

Instead of manipulation flags inline, move the derivation of the flags
of a backing file into a new function next to the existing functions
that derive flags for bs->file and for the block driver open function.

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


  Commit: 5669b44de5b3b607a3a4749e0c8c5ddfd723e76b
      
https://github.com/qemu/qemu/commit/5669b44de5b3b607a3a4749e0c8c5ddfd723e76b
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Remove BDRV_O_COPY_ON_READ for bs->file

Copy on Read makes sense on the format level where backing files are
implemented, but it's not required on the protocol level. While it
shouldn't actively break anything to have COR enabled on both layers,
needless serialisation and allocation checks may impact performance.

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


  Commit: 8bfea15ddac3a0ae832f181653c36e020f24f007
      
https://github.com/qemu/qemu/commit/8bfea15ddac3a0ae832f181653c36e020f24f007
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

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

  Log Message:
  -----------
  block: Unlink temporary files in raw-posix/win32

Instead of having unlink() calls in the generic block layer, where we
aren't even guarateed to have a file name, move them to those block
drivers that are actually used and that always have a filename. Gets us
rid of some #ifdefs as well.

The patch also converts bs->is_temporary to a new BDRV_O_TEMPORARY open
flag so that it is inherited in the protocol layer and the raw-posix and
raw-win32 drivers can unlink the file.

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


  Commit: 7e3d98dd31b6de53923bfb0f04b23b42a94f3829
      
https://github.com/qemu/qemu/commit/7e3d98dd31b6de53923bfb0f04b23b42a94f3829
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  Revert "block: another bdrv_append fix"

This reverts commit 3a389e7926750cba5c83f662b1941888b2bebc04. The commit
was wrong and what it tried to fix just works today without any change.

What the commit tried to fix:

    When creating live snapshots, the new image file is opened with
    BDRV_O_NO_BACKING because the whole backing chain is already opened.
    It is then appended to the chain using bdrv_append(). The result of
    this was that the image had a backing file, but BDRV_O_NO_BACKING
    was still set. This is obviously inconsistent.

    There used to be some places in qemu that closed and image and then
    opened it again, with its old flags (a bdrv_open()/close() sequence
    involves reopening the whole backing file chain, too). In this case
    the BDRV_O_NO_BACKING flag meant that the backing chain wasn't
    reopened and only the top layer was left.

    (Most, but not all of these places are replaced by bdrv_reopen()
    today, which doesn't touch the backing files at all.)

    Other places that looked at bs->open_flags weren't interested in
    BDRV_O_NO_BACKING, so no breakage there.

What it actually did:

    The commit moved the BDRV_O_NO_BACKING away to the backing file.
    Because the bdrv_open()/close() sequences only looked at the flags
    of the top level BlockDriverState and used it for the whole chain,
    the flag didn't hurt there any more. Obviously, it is still
    inconsistent because the backing file may have another backing file,
    but without practical impact.

    At the same time, it swapped all other flags. This is practically
    irrelevant as long as live snapshots only allow opening the new
    layer with the same flags as the old top layer. It still doesn't
    make any sense, and it is a time bomb that explodes as soon as the
    flags can differ.

    bdrv_append_temp_snapshot() is such a case: It adds the new flag
    BDRV_O_TEMPORARY for the temporary snapshot. The swapping of commit
    3a389e79 results in the following nonsensical configuration:

    bs->open_flags:                     BDRV_O_TEMPORARY cleared
    bs->file->open_flags:               BDRV_O_TEMPORARY set
    bs->backing_hd->open_flags:         BDRV_O_TEMPORARY set
    bs->backing_hd->file->open_flags:   BDRV_O_TEMPORARY cleared

    We're still lucky because the format layer ignores the flag and the
    protocol layer happens to get the right value, but sooner or later
    this is bound to go wrong...

What the right fix would have been:

    Simply clear the BDRV_O_NO_BACKING flag when the BlockDriverState is
    appended to an existing backing file chain, because now it does have
    a backing file.

    Commit 4ddc07ca already implemented this silently in bdrv_append(),
    so we don't have to come up with a new fix.

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


  Commit: f1f25a2e2ea0cd3cdc7d01f2e0afbc4aef6fb853
      
https://github.com/qemu/qemu/commit/f1f25a2e2ea0cd3cdc7d01f2e0afbc4aef6fb853
  Author: Kevin Wolf <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Fix open_flags in bdrv_reopen()

Use the same function as bdrv_open() for determining what the right
flags for bs->file are. Without doing this, a reopen means that
bs->file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as
well.

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


  Commit: 35d0d40a034b2392f48f91e4e00c8c94e3526a19
      
https://github.com/qemu/qemu/commit/35d0d40a034b2392f48f91e4e00c8c94e3526a19
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/qapi.c

  Log Message:
  -----------
  block: Use error_abort in bdrv_image_info_specific_dump()

Currently, bdrv_image_info_specific_dump() uses an error variable for
visit_type_ImageInfoSpecific, but ignores the result. As this function
is used here with an output visitor to transform the ImageInfoSpecific
object to a generic QDict, an error should actually be impossible. It is
however better to assert that this is indeed the case. This is done by
this patch using error_abort instead of an unused local Error variable.

Signed-off-by: Max Reitz <address@hidden>
Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 91f827dcff61c3e007def4c949d3a8310954b85e
      
https://github.com/qemu/qemu/commit/91f827dcff61c3e007def4c949d3a8310954b85e
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Avoid overflow in alloc_clusters_noref()

alloc_clusters_noref() stores the cluster index in a uint64_t. However,
offsets are often represented as int64_t (as for example the return
value of alloc_clusters_noref() itself demonstrates). Therefore, we
should make sure all offsets in the allocated range of clusters are
representable using int64_t without overflows.

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


  Commit: 521b2b5df0ccad764cf95164c6e428f855067a6f
      
https://github.com/qemu/qemu/commit/521b2b5df0ccad764cf95164c6e428f855067a6f
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/cow.c
    M block/dmg.c
    M block/qcow.c
    M block/qcow2.c
    M block/sheepdog.c
    M block/vdi.c

  Log Message:
  -----------
  block: Use correct width in format strings

Instead of blindly relying on a normal integer having a width of 32 bits
(which is a pretty good assumption, but we should not rely on it if
there is no need), use the correct format string macros.

This does not touch DEBUG output.

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


  Commit: a49139af77850d64d74f9ffe43cabe7aa4f19de0
      
https://github.com/qemu/qemu/commit/a49139af77850d64d74f9ffe43cabe7aa4f19de0
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Catch bdrv_getlength() error

The call to bdrv_getlength() from qcow2_check_refcounts() may result in
an error. Check this and abort if necessary.

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


  Commit: b93f995081cc32e56071fef179161d2907d0491e
      
https://github.com/qemu/qemu/commit/b93f995081cc32e56071fef179161d2907d0491e
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Check min_size in qcow2_grow_l1_table()

First, new_l1_size is an int64_t, whereas min_size is a uint64_t.
Therefore, during the loop which adjusts new_l1_size until it equals or
exceeds min_size, new_l1_size might overflow and become negative. The
comparison in the loop condition however will take it as an unsigned
value (because min_size is unsigned) and therefore recognize it as
exceeding min_size. Therefore, the loop is left with a negative
new_l1_size, which is not correct. This could be fixed by making
new_l1_size uint64_t.

On the other hand, however, by doing this, the while loop may take
forever. If min_size is e.g. UINT64_MAX, it will take new_l1_size
probably multiple overflows to reach the exact same value (if it reaches
it at all). Then, right after the loop, new_l1_size will be recognized
as being too big anyway.

Both problems require a ridiculously high min_size value, which is very
unlikely to occur; but both problems are also simply avoided by checking
whether min_size is sane before calculating new_l1_size (which should
still be checked separately, though).

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


  Commit: e1b42f456fad6e797eaf795ed2e400c4e47d5eb4
      
https://github.com/qemu/qemu/commit/e1b42f456fad6e797eaf795ed2e400c4e47d5eb4
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/bochs.c

  Log Message:
  -----------
  block/bochs: Fix error handling for seek_to_sector()

Currently, seek_to_sector() returns -1 both for errors and unallocated
sectors, resulting in silent errors. As 0 is an invalid offset of data
clusters (bitmap_offset is greater than 0 because s->data_offset is
greater than 0), just return 0 for unallocated sectors and -errno in
case of error. This should then be propagated by bochs_read(), the sole
user of seek_to_sector().

That function also has a case of "return -1 in case of error", which is
fixed by this patch as well.

bochs_read() is called by bochs_co_read() which passes the return value
through, therefore it is indeed correct for bochs_read() to return
-errno.

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


  Commit: 0549ea8b6d3ed4eba9a3bd0abfaed3af5de69873
      
https://github.com/qemu/qemu/commit/0549ea8b6d3ed4eba9a3bd0abfaed3af5de69873
  Author: Max Reitz <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/vdi.c

  Log Message:
  -----------
  block/vdi: Error out immediately in vdi_create()

Currently, if an error occurs during the part of vdi_create() which
actually writes the image, the function stores -errno, but continues
anyway.

Instead of trying to write data which (if it can be written at all) does
not make any sense without the operations before succeeding (e.g.,
writing the image header), just error out immediately.

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


  Commit: f6246509be602369cfa1250965e1e62a0c62c99f
      
https://github.com/qemu/qemu/commit/f6246509be602369cfa1250965e1e62a0c62c99f
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Fix long line

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9e550b326076caf4a1756b77eee95ad60b4adc27
      
https://github.com/qemu/qemu/commit/9e550b326076caf4a1756b77eee95ad60b4adc27
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Remove unnecessary use of goto

This isn't any of the usually acceptable uses of goto.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 38bbc0a580f9f10570b1d1b5d3e92f0e6feb2970
      
https://github.com/qemu/qemu/commit/38bbc0a580f9f10570b1d1b5d3e92f0e6feb2970
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Fix return from curl_read_cb with invalid state

A curl write callback is supposed to return the number of bytes it
handled.  curl_read_cb would have erroneously reported it had handled
all bytes in the event that the internal curl state was invalid.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e466183718bfaaf347a3c02499473068a0072114
      
https://github.com/qemu/qemu/commit/e466183718bfaaf347a3c02499473068a0072114
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Remove erroneous sleep waiting for curl completion

The driver will not start more than a fixed number of curl sessions.
If it needs more, it must wait for the completion of an existing one.
The driver was sleeping, which will prevent the main loop from
running, and therefore the event it's waiting on. It was also directly
calling its internal handler rather than waiting on existing
registered handlers to be called from the main loop.

This change causes it simply to wait for a period of time whilst
allowing the main loop to execute.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b69cdef876340624bb40a2054d14f298471a40a6
      
https://github.com/qemu/qemu/commit/b69cdef876340624bb40a2054d14f298471a40a6
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Remove unnecessary explicit calls to internal event handler

Remove calls to curl_multi_do where the relevant handles are already
registered to the event loop.

Ensure that we kick off socket handling with CURL_SOCKET_TIMEOUT after
adding a new handle.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 838ef602498b8d1985a231a06f5e328e2946a81d
      
https://github.com/qemu/qemu/commit/838ef602498b8d1985a231a06f5e328e2946a81d
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Eliminate unnecessary use of curl_multi_socket_all

curl_multi_socket_all is a deprecated catch-all which checks for
activities on all open curl sockets. We have enough information from
the event loop to check only the sockets with activity. This change
removes use of curl_multi_socket_all in favour of
curl_multi_socket_action called with the relevant handle.

At the same time, it also ensures that the driver only checks for
completion of read operations after reading from a socket, rather than
both reading and writing.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1f2cead324436da25c3607f4b957f0198a01fc01
      
https://github.com/qemu/qemu/commit/1f2cead324436da25c3607f4b957f0198a01fc01
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Ensure all informationals are checked for completion

According to the documentation, the correct way to ensure all
informationals have been returned by curl_multi_info_read is to loop
until it returns NULL.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b7079df4100069959f4e9d90d5cb5ba7d4ebbf1a
      
https://github.com/qemu/qemu/commit/b7079df4100069959f4e9d90d5cb5ba7d4ebbf1a
  Author: Matthew Booth <address@hidden>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Fix hang reading from slow connections

When receiving a new aio read request, we first look for an existing
transaction whose range will cover the read request by the time it
completes. However, we weren't checking that the existing transaction
was still active. If it had timed out, we were adding the request to a
transaction which would never complete and had already been cancelled,
resulting in a hang.

Signed-off-by: Matthew Booth <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3b7715796401ad1b00f752217fe8f425915e801b
      
https://github.com/qemu/qemu/commit/3b7715796401ad1b00f752217fe8f425915e801b
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/helper.c

  Log Message:
  -----------
  target-arm: Implement XScale cache lockdown operations as NOPs

XScale defines some implementation-specific coprocessor registers
for doing cache lockdown operations. Since QEMU doesn't model a
cache no proper implementation is possible, but NOP out the
registers so that guest code like u-boot that tries to use them
doesn't crash.

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


  Commit: e3da9921ebc554fad3224a9fdda9a7425ffd9ef7
      
https://github.com/qemu/qemu/commit/e3da9921ebc554fad3224a9fdda9a7425ffd9ef7
  Author: Rabin Vincent <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M hw/intc/armv7m_nvic.c

  Log Message:
  -----------
  armv7m_nvic: fix CPUID Base Register

cp15.c0_cpuid is never initialized for ARMv7-M; take the value directly
from cpu->midr instead.

Signed-off-by: Rabin Vincent <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 252ec4057685cd9bf6a13f96528c843754af8fad
      
https://github.com/qemu/qemu/commit/252ec4057685cd9bf6a13f96528c843754af8fad
  Author: Rob Herring <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/translate-a64.c

  Log Message:
  -----------
  target-arm: implement WFE/YIELD as a yield for AArch64

Like was done for AArch32 for WFE, implement both WFE and YIELD as a
yield operation. This speeds up multi-core system emulation.

Signed-off-by: Rob Herring <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: fed3ffb9f157f33bc9b2b1c3ef68e710ee6b7b4b
      
https://github.com/qemu/qemu/commit/fed3ffb9f157f33bc9b2b1c3ef68e710ee6b7b4b
  Author: Edgar E. Iglesias <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/helper.c

  Log Message:
  -----------
  target-arm: Make vbar_write 64bit friendly on 32bit hosts

Signed-off-by: Edgar E. Iglesias <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 1b505f93bcf605e7c4144fef83bd039b0d4f2576
      
https://github.com/qemu/qemu/commit/1b505f93bcf605e7c4144fef83bd039b0d4f2576
  Author: Edgar E. Iglesias <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/translate-a64.c

  Log Message:
  -----------
  target-arm: A64: Handle blr lr

For linked branches, updates to the link register happen
conceptually after the read of the branch target register.

Signed-off-by: Edgar E. Iglesias <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Cc: address@hidden
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 6ab9f49934664f33ad4b449333fc8036c01c4eeb
      
https://github.com/qemu/qemu/commit/6ab9f49934664f33ad4b449333fc8036c01c4eeb
  Author: Edgar E. Iglesias <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/helper.c

  Log Message:
  -----------
  target-arm: A64: Fix a typo when declaring TLBI ops

Harmless typo as opc1 defaults to zero and opc2 gets
re-declared to its correct value.

Signed-off-by: Edgar E. Iglesias <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 37f0806ed9ebaa3b7a7840048818b8916639f2db
      
https://github.com/qemu/qemu/commit/37f0806ed9ebaa3b7a7840048818b8916639f2db
  Author: Edgar E. Iglesias <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M target-arm/op_helper.c

  Log Message:
  -----------
  target-arm: Correct a comment refering to EL0

Signed-off-by: Edgar E. Iglesias <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 642047438446246d98d96f7528a5dc9763473112
      
https://github.com/qemu/qemu/commit/642047438446246d98d96f7528a5dc9763473112
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M hw/arm/virt.c

  Log Message:
  -----------
  hw/arm/virt: Create the GIC ourselves rather than (ab)using a15mpcore_priv

Rather than having the virt machine model create an a15mpcore_priv
device regardless of the actual CPU type in order to instantiate the GIC,
move to having the machine model create the GIC directly. This
corresponds to a system which uses a standalone GIC (eg the GIC-400)
rather than the one built in to the CPU core.

The primary motivation for this is to support the Cortex-A57,
which for a KVM configuration will use a GICv2, which is not
built into the CPU.

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


  Commit: 3078e848faed0d6bf03d1ae789975abab9cb7778
      
https://github.com/qemu/qemu/commit/3078e848faed0d6bf03d1ae789975abab9cb7778
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-01 (Thu, 01 May 2014)

  Changed paths:
    M hw/arm/virt.c

  Log Message:
  -----------
  hw/arm/virt: Put GIC register banks on 64K boundaries

For an AArch64 CPU which supports 64K pages, having the GIC
register banks at 4K offsets is potentially awkward. Move
them out to being at 64K offsets. (This is harmless for
AArch32 CPUs and for AArch64 CPUs with 4K pages, so it is simpler
to use the same offsets everywhere than to try to use 64K offsets
only for AArch64 host CPUs.)

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


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

  Changed paths:
    M hw/arm/virt.c

  Log Message:
  -----------
  hw/arm/virt: Add support for Cortex-A57

Support the Cortex-A57 in the virt machine model.

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


  Commit: e50bf23438f8f35dcf32f9e720b04e0e969a3215
      
https://github.com/qemu/qemu/commit/e50bf23438f8f35dcf32f9e720b04e0e969a3215
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-02 (Fri, 02 May 2014)

  Changed paths:
    M block.c
    M block/bochs.c
    M block/cow.c
    M block/curl.c
    M block/dmg.c
    M block/mirror.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/raw-posix.c
    M block/raw-win32.c
    M block/sheepdog.c
    M block/vdi.c
    M include/block/block.h
    M include/block/block_int.h
    M qemu-img.c
    M tests/qemu-iotests/019
    M tests/qemu-iotests/086
    A tests/qemu-iotests/090
    A tests/qemu-iotests/090.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group

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

Block patches

# gpg: Signature made Wed 30 Apr 2014 19:19:32 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream: (31 commits)
  curl: Fix hang reading from slow connections
  curl: Ensure all informationals are checked for completion
  curl: Eliminate unnecessary use of curl_multi_socket_all
  curl: Remove unnecessary explicit calls to internal event handler
  curl: Remove erroneous sleep waiting for curl completion
  curl: Fix return from curl_read_cb with invalid state
  curl: Remove unnecessary use of goto
  curl: Fix long line
  block/vdi: Error out immediately in vdi_create()
  block/bochs: Fix error handling for seek_to_sector()
  qcow2: Check min_size in qcow2_grow_l1_table()
  qcow2: Catch bdrv_getlength() error
  block: Use correct width in format strings
  qcow2: Avoid overflow in alloc_clusters_noref()
  block: Use error_abort in bdrv_image_info_specific_dump()
  block: Fix open_flags in bdrv_reopen()
  Revert "block: another bdrv_append fix"
  block: Unlink temporary files in raw-posix/win32
  block: Remove BDRV_O_COPY_ON_READ for bs->file
  block: Create bdrv_backing_flags()
  ...

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


  Commit: fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc
      
https://github.com/qemu/qemu/commit/fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-02 (Fri, 02 May 2014)

  Changed paths:
    M hw/arm/virt.c
    M hw/intc/armv7m_nvic.c
    M target-arm/helper.c
    M target-arm/op_helper.c
    M target-arm/translate-a64.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' 
into staging

target-arm queue:
 * implement XScale cache lockdown cp15 ops
 * fix v7M CPUID base register
 * implement WFE and YIELD as yields for A64
 * fix A64 "BLR LR"
 * support Cortex-A57 in virt machine model
 * a few other minor AArch64 bugfixes

# gpg: Signature made Thu 01 May 2014 15:42:17 BST using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <address@hidden>"

* remotes/pmaydell/tags/pull-target-arm-20140501:
  hw/arm/virt: Add support for Cortex-A57
  hw/arm/virt: Put GIC register banks on 64K boundaries
  hw/arm/virt: Create the GIC ourselves rather than (ab)using a15mpcore_priv
  target-arm: Correct a comment refering to EL0
  target-arm: A64: Fix a typo when declaring TLBI ops
  target-arm: A64: Handle blr lr
  target-arm: Make vbar_write 64bit friendly on 32bit hosts
  target-arm: implement WFE/YIELD as a yield for AArch64
  armv7m_nvic: fix CPUID Base Register
  target-arm: Implement XScale cache lockdown operations as NOPs

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


Compare: https://github.com/qemu/qemu/compare/c090c10dc4b8...fdaad4715ae9

reply via email to

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