qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 28fa71: ide: Fix bootindex for bus_id > 9


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 28fa71: ide: Fix bootindex for bus_id > 9
Date: Mon, 01 Sep 2014 03:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 28fa7133b89555355418aeee4fca01cae2081aeb
      
https://github.com/qemu/qemu/commit/28fa7133b89555355418aeee4fca01cae2081aeb
  Author: Markus Armbruster <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M hw/ide/qdev.c

  Log Message:
  -----------
  ide: Fix bootindex for bus_id > 9

We identify devices by their Open Firmware device paths.  The encoding
of bus numbers is incorrect: idebus_get_fw_dev_path() formats them in
decimal, while SeaBIOS uses hexadecimal.  With bus number > 9, SeaBIOS
will miss the bootindex (lucky case), or apply it to another device
(unlucky case).

Bug can't bite right now: ich9-ahci has six ports, and the sysbus-ahci
created by Calxeda Highbank has just one.

Fix it anyway, by changing %d to %x.

I couldn't find an Open Firmware spec covering this.  For what it's
worth, OVMF agrees with SeaBIOS.

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 212aefaa53d142baa9a22f5aadd2e72eb916c0c0
      
https://github.com/qemu/qemu/commit/212aefaa53d142baa9a22f5aadd2e72eb916c0c0
  Author: Daniel Henrique Barboza <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/curl.c
    M qemu-options.hx

  Log Message:
  -----------
  block.curl: adding 'timeout' option

The curl hardcoded timeout (5 seconds) sometimes is not long
enough depending on the remote server configuration and network
traffic. The user should be able to set how much long he is
willing to wait for the connection.

Adding a new option to set this timeout gives the user this
flexibility. The previous default timeout of 5 seconds will be
used if this option is not present.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: a3981eb978b76e75aca3d04f6c6e26de8322001b
      
https://github.com/qemu/qemu/commit/a3981eb978b76e75aca3d04f6c6e26de8322001b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: fix img_commit() error return value

The img_commit() return value is a process exit code.  Use 1 for failure
instead of -1.  The other failure paths in this function already use 1.

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


  Commit: cbda016d94017fad3be1c657f0ad98f88395c12a
      
https://github.com/qemu/qemu/commit/cbda016d94017fad3be1c657f0ad98f88395c12a
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: fix img_compare() flags error path

If img_compare() fails to parse the cache flags the goto out3 code path
will call qemu_progress_end().  Make sure we actually call
qemu_progress_init() first.

Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 40ed35a3c4f7d26247cbbb01a2b3ff544fb50819
      
https://github.com/qemu/qemu/commit/40ed35a3c4f7d26247cbbb01a2b3ff544fb50819
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: always goto out in img_snapshot() error paths

The out label has the qemu_progress_end() and other cleanup calls.
Always goto out in error paths so the cleanup happens.  These error
paths now return 1 instead of -1.

Note that bdrv_unref(NULL) is safe.  We just need to initialize bs to
NULL at the top of the function.

We can now remove the obsolete bs_old_backing = NULL and bs_new_backing
= NULL for safe mode.  Originally it was necessary in commit 3e85c6fd
("qemu-img rebase") but became useless in commit c2abcce ("qemu-img:
avoid calling exit(1) to release resources properly") because the
variables are already initialized during declaration.

Reported-by: John Snow <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 1dbfafed7f0478fde29de7b69692c4d58b9e6c25
      
https://github.com/qemu/qemu/commit/1dbfafed7f0478fde29de7b69692c4d58b9e6c25
  Author: Hitoshi Mitake <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: adopting protocol update for VDI locking

The update is required for supporting iSCSI multipath. It doesn't
affect behavior of QEMU driver but adding a new field to vdi request
struct is required.

Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Liu Yuan <address@hidden>
Cc: MORITA Kazutaka <address@hidden>
Signed-off-by: Hitoshi Mitake <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 38890b246d7c21d29ac50831c0792994cf289a2c
      
https://github.com/qemu/qemu/commit/38890b246d7c21d29ac50831c0792994cf289a2c
  Author: Hitoshi Mitake <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: improve error handling for a case of failed lock

Recently, sheepdog revived its VDI locking functionality. This patch
updates sheepdog driver of QEMU for this feature. It changes an error
code for a case of failed locking. -EBUSY is a suitable one.

Reported-by: Valerio Pachera <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Liu Yuan <address@hidden>
Cc: MORITA Kazutaka <address@hidden>
Signed-off-by: Hitoshi Mitake <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 62c6031f96997d864edfc49304e9f50d9496907a
      
https://github.com/qemu/qemu/commit/62c6031f96997d864edfc49304e9f50d9496907a
  Author: Liu Yuan <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: add read-pattern enum for quorum

Cc: Eric Blake <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Liu Yuan <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: a9db86b223030bd40bdd81b160788196bc95fe6f
      
https://github.com/qemu/qemu/commit/a9db86b223030bd40bdd81b160788196bc95fe6f
  Author: Liu Yuan <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  block/quorum: add simple read pattern support

This patch adds single read pattern to quorum driver and quorum vote is default
pattern.

For now we do a quorum vote on all the reads, it is designed for unreliable
underlying storage such as non-redundant NFS to make sure data integrity at the
cost of the read performance.

For some use cases as following:
   VM
  --------------
  |            |
  v            v
  A            B

Both A and B has hardware raid storage to justify the data integrity on its own.
So it would help performance if we do a single read instead of on all the nodes.
Further, if we run VM on either of the storage node, we can make a local read
request for better performance.

This patch generalize the above 2 nodes case in the N nodes. That is,

vm -> write to all the N nodes, read just one of them. If single read fails, we
try to read next node in FIFO order specified by the startup command.

The 2 nodes case is very similar to DRBD[1] though lack of auto-sync
functionality in the single device/node failure for now. But compared with DRBD
we still have some advantages over it:

- Suppose we have 20 VMs running on one(assume A) of 2 nodes' DRBD backed
storage. And if A crashes, we need to restart all the VMs on node B. But for
practice case, we can't because B might not have enough resources to setup 20 
VMs
at once. So if we run our 20 VMs with quorum driver, and scatter the replicated
images over the data center, we can very likely restart 20 VMs without any
resource problem.

After all, I think we can build a more powerful replicated image functionality
on quorum and block jobs(block mirror) to meet various High Availibility needs.

E.g, Enable single read pattern on 2 children,

-drive driver=quorum,children.0.file.filename=0.qcow2,\
children.1.file.filename=1.qcow2,read-pattern=fifo,vote-threshold=1

[1] http://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device

[Dropped \n from an error_setg() error message
--Stefan]

Cc: Benoit Canet <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Signed-off-by: Liu Yuan <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 0b9caf9b3166c8deb3c4f3a774c2384b069dc29c
      
https://github.com/qemu/qemu/commit/0b9caf9b3166c8deb3c4f3a774c2384b069dc29c
  Author: Fam Zheng <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M blockjob.c
    M include/block/coroutine.h
    M qemu-coroutine-sleep.c

  Log Message:
  -----------
  coroutine: Drop co_sleep_ns

block_job_sleep_ns is the only user. Since we are moving towards
AioContext aware code, it's better to use the explicit version and drop
the old one.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 3cbbe9fd1feaf3264f745fccb0bf5f62c583078f
      
https://github.com/qemu/qemu/commit/3cbbe9fd1feaf3264f745fccb0bf5f62c583078f
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: fix drive-mirror 'granularity' error message

Name the 'granularity' parameter and give its expected value range.
Previously the device name was mistakenly reported as the parameter
name.

Note that the error class is unchanged from ERROR_CLASS_GENERIC_ERROR.

Reported-by: Eric Blake <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>


  Commit: 845ca10dd089b4e48f0a79bad005fb30eb77584e
      
https://github.com/qemu/qemu/commit/845ca10dd089b4e48f0a79bad005fb30eb77584e
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  AioContext: take bottom halves into account when computing aio_poll timeout

Right now, QEMU invokes aio_bh_poll before the "poll" phase
of aio_poll.  It is simpler to do it afterwards and skip the
"poll" phase altogether when the OS-dependent parts of AioContext
are invoked from GSource.  This way, AioContext behaves more
similarly when used as a GSource vs. when used as stand-alone.

As a start, take bottom halves into account when computing the
poll timeout.  If a bottom half is ready, do a non-blocking
poll.  As a side effect, this makes idle bottom halves work
with aio_poll; an improvement, but not really an important
one since they are deprecated.

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


  Commit: d397ec99bb1c03a06afbeab7bfa65a43138eafb6
      
https://github.com/qemu/qemu/commit/d397ec99bb1c03a06afbeab7bfa65a43138eafb6
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M aio-win32.c

  Log Message:
  -----------
  aio-win32: Evaluate timers after handles

This is similar to what aio_poll does in the stand-alone case.

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


  Commit: a398dea34c62b238e714bb4c3a968b4ca11e256b
      
https://github.com/qemu/qemu/commit/a398dea34c62b238e714bb4c3a968b4ca11e256b
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M aio-win32.c

  Log Message:
  -----------
  aio-win32: Factor out duplicate code into aio_dispatch_handlers

Later, the call to aio_dispatch will move int the GSource wrapper, while the
standalone case will still be call the component functions aio_bh_poll,
aio_dispatch_handlers and timerlistgroup_run_timers.

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


  Commit: 3672fa50837c1700deb1f86f0068c22c7e49aa22
      
https://github.com/qemu/qemu/commit/3672fa50837c1700deb1f86f0068c22c7e49aa22
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M aio-posix.c
    M aio-win32.c

  Log Message:
  -----------
  AioContext: run bottom halves after polling

Make the dispatching phase the same before blocking and afterwards.
The next patch will make aio_dispatch public and use it directly
for the GSource case, instead of aio_poll.  aio_poll can then be
simplified heavily.

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


  Commit: e4c7e2d12d7b1c4501ab3397218a206d4953e633
      
https://github.com/qemu/qemu/commit/e4c7e2d12d7b1c4501ab3397218a206d4953e633
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  AioContext: export and use aio_dispatch

So far, aio_poll's scheme was dispatch/poll/dispatch, where
the first dispatch phase was used only in the GSource case in
order to avoid a blocking poll.  Earlier patches changed it to
dispatch/prepare/poll/dispatch, where prepare is aio_compute_timeout.

By making aio_dispatch public, we can remove the first dispatch
phase altogether, so that both aio_poll and the GSource use the same
prepare/poll/dispatch scheme.

This patch breaks the invariant that aio_poll(..., true) will not block
the first time it returns false.  This used to be fundamental for
qemu_aio_flush's implementation as "while (qemu_aio_wait()) {}" but
no code in QEMU relies on this invariant anymore.  The return value
of aio_poll() is now comparable with that of g_main_context_iteration.

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


  Commit: 363285d4b39cbd80427b4fb0a71266fef17290bf
      
https://github.com/qemu/qemu/commit/363285d4b39cbd80427b4fb0a71266fef17290bf
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M tests/test-aio.c

  Log Message:
  -----------
  test-aio: test timers on Windows too

Use EventNotifier instead of a pipe, which makes it trivial to test
timers on Windows.

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


  Commit: 0a9dd1664a0509f7c3c0c7a5550446258ee70f4b
      
https://github.com/qemu/qemu/commit/0a9dd1664a0509f7c3c0c7a5550446258ee70f4b
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M aio-win32.c

  Log Message:
  -----------
  aio-win32: add aio_set_dispatching optimization

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


  Commit: a3462c656128e7b900ccc5d436f9e858d07de264
      
https://github.com/qemu/qemu/commit/a3462c656128e7b900ccc5d436f9e858d07de264
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  AioContext: introduce aio_prepare

This will be used to implement socket polling on Windows.
On Windows, select() and g_poll() are completely different;
sockets are polled with select() before calling g_poll,
and the g_poll must be nonblocking if select() says a
socket is ready.

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


  Commit: 79d9b6566b90efac072720f37a1b57d73f539264
      
https://github.com/qemu/qemu/commit/79d9b6566b90efac072720f37a1b57d73f539264
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M nbd.c
    M qemu-coroutine-io.c

  Log Message:
  -----------
  qemu-coroutine-io: fix for Win32

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


  Commit: b493317d344357f7ac56606246d09b5604e54ab6
      
https://github.com/qemu/qemu/commit/b493317d344357f7ac56606246d09b5604e54ab6
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  aio-win32: add support for sockets

Uses the same select/WSAEventSelect scheme as main-loop.c.
WSAEventSelect() is edge-triggered, so it cannot be used
directly, but it is still used as a way to exit from a
blocking g_poll().

Before g_poll() is called, we poll sockets with a non-blocking
select() to achieve the level-triggered semantics we require:
if a socket is ready, the g_poll() is made non-blocking too.

Based on a patch from Or Goshen.

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


  Commit: a780dea0454d2820e31407c33f167acf00fe447d
      
https://github.com/qemu/qemu/commit/a780dea0454d2820e31407c33f167acf00fe447d
  Author: Liu Yuan <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: fix a core dump while do auto-reconnecting

We should reinit local_err as NULL inside the while loop or g_free() will report
corrupption and abort the QEMU when sheepdog driver tries reconnecting.

This was broken in commit 356b4ca.

qemu-system-x86_64: failed to get the header, Resource temporarily unavailable
qemu-system-x86_64: Failed to connect to socket: Connection refused
qemu-system-x86_64: (null)
[xcb] Unknown sequence number while awaiting reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been 
called
[xcb] Aborting, sorry about that.
qemu-system-x86_64: ../../src/xcb_io.c:298: poll_for_response: Assertion 
`!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)

Cc: address@hidden
Cc: Markus Armbruster <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Liu Yuan <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 958c717df97ea9ca47a2253b8371130fe5f22980
      
https://github.com/qemu/qemu/commit/958c717df97ea9ca47a2253b8371130fe5f22980
  Author: Max Reitz <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M nbd.c

  Log Message:
  -----------
  nbd: Drop nbd_can_read()

There is no variant of aio_set_fd_handler() like qemu_set_fd_handler2(),
so we cannot give a can_read() callback function. Instead, unregister
the nbd_read() function whenever we cannot read and re-register it as
soon as we can read again.

All this is hidden behind the functions nbd_set_handlers() (which
registers all handlers for the AIO context and file descriptor belonging
to the given client), nbd_unset_handlers() (which unregisters them) and
nbd_update_can_read() (which checks whether NBD can read for the given
client and acts accordingly).

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


  Commit: 33384421b3abe74555baeaf788b17204cd8c6080
      
https://github.com/qemu/qemu/commit/33384421b3abe74555baeaf788b17204cd8c6080
  Author: Max Reitz <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  block: Add AIO context notifiers

If a long-running operation on a BDS wants to always remain in the same
AIO context, it somehow needs to keep track of the BDS changing its
context. This adds a function for registering callbacks on a BDS which
are called whenever the BDS is attached or detached from an AIO context.

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


  Commit: f21492817bc426a3bc0b98fa852df95be9dea1e8
      
https://github.com/qemu/qemu/commit/f21492817bc426a3bc0b98fa852df95be9dea1e8
  Author: Max Reitz <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M nbd.c

  Log Message:
  -----------
  nbd: Follow the BDS' AIO context

Keep the NBD server always in the same AIO context as the exported BDS
by calling bdrv_add_aio_context_notifier() and implementing the required
callbacks.

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


  Commit: 391827eb106d2d02062b2582d1545a7c221631c6
      
https://github.com/qemu/qemu/commit/391827eb106d2d02062b2582d1545a7c221631c6
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: fix overlapping multiwrite requests

When request A is a strict superset of request B:

  AAAAAAAA
    BBBB

multiwrite_merge() merges them as follows:

  AABBBB

The tail of request A should have been included:

  AABBBBAA

This patch fixes data loss but this code path is probably rare.  Since
guests cannot assume ordering between in-flight requests, few
applications submit overlapping write requests.

Reported-by: Slava Pestov <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>


  Commit: 12ade7609004bb1b09a845c144b36ea1850854c7
      
https://github.com/qemu/qemu/commit/12ade7609004bb1b09a845c144b36ea1850854c7
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  qemu-iotests: add multiwrite test cases

This test case covers the basic bdrv_aio_multiwrite() scenarios:
1. Single request
2. Sequential requests (AABB)
3. Superset overlapping requests (AABBAA)
4. Subset overlapping requests (BBAABB)
5. Head overlapping requests (AABB)
6. Tail overlapping requests (BBAA)
7. Disjoint requests (AA BB)

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>


  Commit: 2cdff7f620ebd3b5246cf0c0d1f6fa0eededa4ca
      
https://github.com/qemu/qemu/commit/2cdff7f620ebd3b5246cf0c0d1f6fa0eededa4ca
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/linux-aio.c

  Log Message:
  -----------
  linux-aio: avoid deadlock in nested aio_poll() calls

If two Linux AIO request completions are fetched in the same
io_getevents() call, QEMU will deadlock if request A's callback waits
for request B to complete using an aio_poll() loop.  This was reported
to happen with the mirror blockjob.

This patch moves completion processing into a BH and makes it resumable.
Nested event loops can resume completion processing so that request B
will complete and the deadlock will not occur.

Cc: Kevin Wolf <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Ming Lei <address@hidden>
Cc: Marcin Gibuła <address@hidden>
Reported-by: Marcin Gibuła <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Tested-by: Marcin Gibuła <address@hidden>


  Commit: 8ad4202bf61bc1d124ff26016cfe17cb261cc392
      
https://github.com/qemu/qemu/commit/8ad4202bf61bc1d124ff26016cfe17cb261cc392
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: acquire AioContext in do_drive_del()

Make drive_del safe for dataplane where another thread may be running
the BlockDriverState's AioContext.

Note the assumption that AioContext's lifetime exceeds DriveInfo and
BlockDriverState.  We release AioContext after DriveInfo and
BlockDriverState are potentially freed.

This is clearly safe with the global AioContext but also with -object
iothread and implicit iothreads created by -device
virtio-blk-pci,x-data-plane=on (their lifetime is tied to DeviceState,
not BlockDriverState).

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


  Commit: 3255d1c21f364774390061fbc3b8e25c027cc862
      
https://github.com/qemu/qemu/commit/3255d1c21f364774390061fbc3b8e25c027cc862
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

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

  Log Message:
  -----------
  virtio-blk: allow drive_del with dataplane

Now that drive_del acquires the AioContext we can safely allow deleting
the drive.  As with non-dataplane mode, all I/Os submitted by the guest
after drive_del will return EIO.

This patch makes hot unplug work with virtio-blk dataplane.  Previously
drive_del reported an error because the device was busy.

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


  Commit: a94f83d94fdf907680f068f1be7ad13d1f697067
      
https://github.com/qemu/qemu/commit/a94f83d94fdf907680f068f1be7ad13d1f697067
  Author: Richard W.M. Jones <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/curl.c
    M qemu-options.hx

  Log Message:
  -----------
  curl: Allow a cookie or cookies to be sent with http/https requests.

In order to access VMware ESX efficiently, we need to send a session
cookie.  This patch is very simple and just allows you to send that
session cookie.  It punts on the question of how you get the session
cookie in the first place, but in practice you can just run a `curl'
command against the server and extract the cookie that way.

To use it, add file.cookie to the curl URL.  For example:

$ qemu-img info 'json: {
    "file.driver":"https",
    
"file.url":"https://vcenter/folder/Windows%202003/Windows%202003-flat.vmdk?dcPath=Datacenter&dsName=datastore1";,
    "file.sslverify":"off",
    
"file.cookie":"vmware_soap_session=\"52a01262-bf93-ccce-d379-8dabb3e55560\""}'
image: [...]
file format: raw
virtual size: 8.0G (8589934592 bytes)
disk size: unavailable

Signed-off-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: a2f468e48f8b6559ec9123e94948bc373b788941
      
https://github.com/qemu/qemu/commit/a2f468e48f8b6559ec9123e94948bc373b788941
  Author: Richard W.M. Jones <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: Don't deref NULL pointer in call to aio_poll.

In commit 63f0f45f2e89b60ff8245fec81328ddfde42a303 the following
mechanical change was made:
    if (!state) {
-            qemu_aio_wait();
+            aio_poll(state->s->aio_context, true);
   }

The new code now checks if state is NULL and then dereferences it
('state->s') which is obviously incorrect.

This commit replaces state->s->aio_context with
bdrv_get_aio_context(bs), fixing this problem.  The two other hunks
are concerned with getting the BlockDriverState pointer bs to where it
is needed.

The original bug causes a segfault when using libguestfs to access a
VMware vCenter Server and doing any kind of complex read-heavy
operations.  With this commit the segfault goes away.

Signed-off-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 810f4f86b7ebfd0a89fb65bff24aae006483cd58
      
https://github.com/qemu/qemu/commit/810f4f86b7ebfd0a89fb65bff24aae006483cd58
  Author: Fam Zheng <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/nfs.c

  Log Message:
  -----------
  nfs: Fix leak of opts in nfs_file_open

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 315859312628e581322fe44742f3a05d1549539a
      
https://github.com/qemu/qemu/commit/315859312628e581322fe44742f3a05d1549539a
  Author: Fam Zheng <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/blkverify.c

  Log Message:
  -----------
  blkverify: Fix leak of opts in blkverify_open

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 8df3abfceef557551f00adac1618ddd6fe46f85c
      
https://github.com/qemu/qemu/commit/8df3abfceef557551f00adac1618ddd6fe46f85c
  Author: Fam Zheng <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Fix leak of opts in quorum_open

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 988f46361465db0d4fce50e71fa0ff8f9d20483e
      
https://github.com/qemu/qemu/commit/988f46361465db0d4fce50e71fa0ff8f9d20483e
  Author: Peter Maydell <address@hidden>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M aio-posix.c
    M aio-win32.c
    M async.c
    M block.c
    M block/Makefile.objs
    M block/blkverify.c
    M block/curl.c
    M block/linux-aio.c
    M block/nfs.c
    M block/quorum.c
    M block/sheepdog.c
    M blockdev.c
    M blockjob.c
    M hw/block/dataplane/virtio-blk.c
    M hw/ide/qdev.c
    M include/block/aio.h
    M include/block/block_int.h
    M include/block/coroutine.h
    M nbd.c
    M qapi/block-core.json
    M qemu-coroutine-io.c
    M qemu-coroutine-sleep.c
    M qemu-img.c
    M qemu-options.hx
    A tests/qemu-iotests/100
    A tests/qemu-iotests/100.out
    M tests/qemu-iotests/group
    M tests/test-aio.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into 
staging

Block pull request

# gpg: Signature made Fri 29 Aug 2014 17:25:58 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"

* remotes/stefanha/tags/block-pull-request: (35 commits)
  quorum: Fix leak of opts in quorum_open
  blkverify: Fix leak of opts in blkverify_open
  nfs: Fix leak of opts in nfs_file_open
  curl: Don't deref NULL pointer in call to aio_poll.
  curl: Allow a cookie or cookies to be sent with http/https requests.
  virtio-blk: allow drive_del with dataplane
  block: acquire AioContext in do_drive_del()
  linux-aio: avoid deadlock in nested aio_poll() calls
  qemu-iotests: add multiwrite test cases
  block: fix overlapping multiwrite requests
  nbd: Follow the BDS' AIO context
  block: Add AIO context notifiers
  nbd: Drop nbd_can_read()
  sheepdog: fix a core dump while do auto-reconnecting
  aio-win32: add support for sockets
  qemu-coroutine-io: fix for Win32
  AioContext: introduce aio_prepare
  aio-win32: add aio_set_dispatching optimization
  test-aio: test timers on Windows too
  AioContext: export and use aio_dispatch
  ...

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


Compare: https://github.com/qemu/qemu/compare/8b3030114a44...988f46361465

reply via email to

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