Am 11.06.2015 um 04:51 schrieb Fam Zheng:
On Wed, 06/10 14:38, Alexander Yarygin wrote:
Each call of the virtio_blk_reset() function calls blk_drain_all(),
which works for all existing BlockDriverStates, while draining only
one is needed.
This patch replaces blk_drain_all() by blk_drain() in
Signed-off-by: Alberto Garcia be...@igalia.com
---
hw/ppc/ppc.c | 2 --
hw/ppc/spapr_rtc.c | 3 +--
hw/timer/mc146818rtc.c | 1 -
hw/usb/hcd-ehci.c | 2 +-
include/qemu/timer.h | 2 +-
tests/rtl8139-test.c | 10 +-
tests/test-throttle.c | 8
This module computes the average of a set of values within a time
window, keeping also track of the minimum and maximum values.
In order to produce more accurate results it works internally by
creating two time windows of the same period, offsetted by half of
that period. Values are accounted on
This series adds a new module that can be used to compute the average
of a set of values in a certain period of time. This will be used by
the accounting code to obtain statistics such as the min / max /
average latency of I/O commands.
This is based on BenoƮt's code, originally written last
We want to be able to reuse this define by making it common to
multiple QEMU modules.
This also makes it an integer since there's no need for it to be a
float.
Signed-off-by: Alberto Garcia be...@igalia.com
---
include/qemu/throttle.h | 2 --
include/qemu/timer.h| 2 ++
2 files changed, 2
On Mon, Jun 08, 2015 at 06:17:40PM +0200, Alberto Garcia wrote:
V9:
- Make test-throttle.c call bdrv_init() to make sure that
throttle_groups_init() gets called and the mutex is initialized.
This was breaking the tests in Mac OS X.
V8:
Now we have virtio-pci, we can make the virt board's default block
device type be IF_VIRTIO. This allows users to use simplified
command lines that don't have to explicitly create virtio-pci-blk
devices; the -hda c very short options now also work.
This means we also need to set no_cdrom to avoid
On Wed, Jun 10, 2015 at 02:38:17PM +0300, Alexander Yarygin wrote:
After the commit 9b536adc (block: acquire AioContext in
bdrv_drain_all()) the aio_poll() function got called for every
BlockDriverState, in assumption that every device may have its own
AioContext. If we have thousands of disks
On 10.06.2015 15:47, Kevin Wolf wrote:
If the head of a list has been moved to a different memory location, the
le_prev link in the first list entry has to be fixed up. Provide a macro
that implements this fixup.
Signed-off-by: Kevin Wolf kw...@redhat.com
---
include/qemu/queue.h | 6 ++
From: John Snow js...@redhat.com
RHEL6 doesn't have Python 2.7, so replace this call with
assertNotEqual(x, None) which will work just as well.
Reported-by: Kevin Wolf kw...@redhat.com
Signed-off-by: John Snow js...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com
Signed-off-by: Kevin
From: Fam Zheng f...@redhat.com
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
Signed-off-by: Kevin Wolf kw...@redhat.com
---
block/vmdk.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index
From: Max Reitz mre...@redhat.com
The L2 cache must cover at least two L2 tables, because during COW two
L2 tables are accessed simultaneously.
Reported-by: Alexander Graf ag...@suse.de
Cc: qemu-stable qemu-sta...@nongnu.org
Signed-off-by: Max Reitz mre...@redhat.com
Tested-by: Alexander Graf
From: Fam Zheng f...@redhat.com
It has the similar issue with b1649fae49a8. Since the calculation
is repeated for a few times already, introduce a function so it can be
reused.
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
Signed-off-by: Kevin Wolf
This adds test cases for the following new QDict functions:
* qdict_array_entries()
* qdict_set_default_str()
* qdict_copy_default()
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
---
tests/check-qdict.c | 67
This counts the entries in a flattened array in a QDict without
actually splitting the QDict into a QList.
bdrv_open_image() doesn't take a QList, but rather a QDict and a key
prefix string, so this is more convenient for block drivers which have a
dynamically sized list of child nodes (e.g.
In the block layer functions that determine options for a child block
device, it's a common pattern to either copy options from the parent's
options or to set a default string if the option isn't explicitly set
yet for the child. Provide convenience functions so that it becomes a
one-liner for
When reopening an image, the block layer already takes care to reopen
bs-file as well with recalculated inherited flags. The same must happen
for any other child (most notably missing before this patch: backing
files).
If bs-file (or any other child) didn't originally inherit from bs, e.g.
The following changes since commit 4cb618abc1818586c08011ff0a84a015787b1672:
Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150612' into staging
(2015-06-12 12:49:40 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you
From: Fam Zheng f...@redhat.com
If passwordless sudo works, use it in the qemu-io cmd.
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com
Signed-off-by: Kevin Wolf kw...@redhat.com
---
tests/qemu-iotests/128 | 4 +++-
1 file changed, 3 insertions(+), 1
From: John Snow js...@redhat.com
This is an artifact of an older version that had both all-bitmap and
single-bitmap truncate functions, and some info got lost in the shuffle.
Bitmaps can only be frozen during a backup operation, and a backup
operation should prevent a resize operation, so just
From: Max Reitz mre...@redhat.com
This adds a test case to test 103 for performing a COW operation in a
qcow2 image using an L2 cache with minimal size (which should be at
least two clusters so the COW can access both source and destination
simultaneously).
Signed-off-by: Max Reitz
Besides standardising on a single interface for opening child nodes,
this patch allows the user to specify options to individual extent
nodes. Overriding file names isn't possible with this yet, so it's of
limited usefulness, but still a step forward.
Signed-off-by: Kevin Wolf kw...@redhat.com
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
Reviewed-by: Jeff Cody jc...@redhat.com
Reviewed-by: Alberto Garcia be...@igalia.com
---
blockdev.c| 24
include/block/block.h | 8
Image files with an unaligned image size have a final hole that starts
at EOF, i.e. in the middle of a sector. Currently, *pnum == 0 is
returned when checking the status of this sector. In qemu-img, this
triggers an assertion failure.
In order to fix this, one type for the sector that contains
Instead of manually parsing options and then deleting them from the
options QDict, just use QemuOpts like most other places that deal with
block device options.
More options will be added there and then QemuOpts is a lot more
manageable than open-coding everything.
Signed-off-by: Kevin Wolf
This allows iterating over all children of a given BDS, not only
including bs-file and bs-backing_hd, but also driver-specific
ones like VMDK extents or Quorum children.
For bdrv_swap(), the list of children of the swapped BDS stays at that
BDS (because that's where the pointers stay as well).
From: Max Reitz mre...@redhat.com
The BDRV_O_PROTOCOL flag should have an impact only if no driver is
specified explicitly. Therefore, if bdrv_open() is called with an
explicit block driver argument (either through the options QDict or
through the drv parameter) and that block driver is a
Besides standardising on a single interface for opening child nodes,
this simplifies the .bdrv_open() implementation of the quorum block
driver by using block layer functionality for handling BlockdevRefs.
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
If the head of a list has been moved to a different memory location, the
le_prev link in the first list entry has to be fixed up. Provide a macro
that implements this fixup.
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Max Reitz
bdrv_swap() requires that there are no requests in flight on either of
the two devices. The request coroutine would work on the wrong
BlockDriverState object (with bs-opaque even being interpreted as a
different type potentially) and all sorts of bad things would result
from this.
The currently
Instead of letting every caller of bdrv_open() determine the right flags
for its child node manually and pass them to the function, pass the
parent node and the role of the newly opened child (like backing file,
protocol layer, etc.).
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric
Currently, the block layer assumes that any block node can have only one
parent, and if it has a parent, that it inherits some options/flags from
this parent.
This is not true any more: With references used in block device
creation, a single node can be used by multiple parents, or it can be
Improve the diagnosis of command line errors where the user requested
an automatic connection of a drive (via if=something, or by not
setting if= and using the board-default-if). We already fail this
case if the board actually handles if=something, but if the board
did not auto-connect the drive
Instead of having set_pointer() call a parse callback which returns
an error number that we then convert to an Error string with
error_set_from_qdev_prop_error(), make the parse callback take an
Error** and set the error itself. This will allow parse routines
to provide more helpful error messages
On 10.06.2015 15:47, Kevin Wolf wrote:
This allows iterating over all children of a given BDS, not only
including bs-file and bs-backing_hd, but also driver-specific
ones like VMDK extents or Quorum children.
For bdrv_swap(), the list of children of the swapped BDS stays at that
BDS (because
This patchset attempts to improve the warning and error messages for
bad user command lines that attempt to connect a drive up to two
devices. The motivation here is patch #4, which changes the default
interface for the virt board to virtio. That will break some existing
command lines which forgot
On 10.06.2015 15:47, Kevin Wolf wrote:
Instead of manually parsing options and then deleting them from the
options QDict, just use QemuOpts like most other places that deal with
block device options.
More options will be added there and then QemuOpts is a lot more
managable than open-coding
37 matches
Mail list logo