[ Cc: qemu-block ]
Am 17.12.2015 um 02:55 hat Fam Zheng geschrieben:
> On Wed, 12/16 19:33, Paolo Bonzini wrote:
> > Do not use bdrv_drain, since by itself it does not guarantee
> > anything.
> >
> > Signed-off-by: Paolo Bonzini
Thanks, applied to the block branch.
Kevin
Kevin, Max and I used an opportunity to meet and discuss block layer
matters. We examined two topics in some depth: BlockBackend, and block
filters and dynamic reconfiguration.
Not nearly enough people to call it a block summit. But the local
dialect is known for its use of diminutives, and
This patch adds a QemuOpts for generic block layer options to
bdrv_reopen_prepare(). The only two options that currently exist
(node-name and driver) cannot be changed, so the only thing we do is
putting them right back into the QDict so that we check at the end that
they are indeed unchanged.
We
From: John Snow
Code motion only, in preparation for adjusting
the setUp procedure for this test.
Signed-off-by: John Snow
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/124 | 117 +
1
From: John Snow
If it happens to match the backing path, that was the actual path.
Signed-off-by: John Snow
Reviewed-by: Max Reitz
Message-id: 1450122916-4706-2-git-send-email-js...@redhat.com
Signed-off-by: Max Reitz
From: John Snow
Split it into an abstract test class and an implementation class.
The split is primarily to facilitate more flexible setUp variations
for other kinds of tests without having to rewrite or shuffle around
all of these helpers.
See the following two patches for
The following changes since commit 67a708406221f476c0f8fa60c192c186150c5185:
Merge remote-tracking branch
'remotes/berrange/tags/pull-io-channel-base-2015-12-18-1' into staging
(2015-12-18 12:42:10 +)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git
John Snow writes:
> This patch adds a new explicit Floppy Drive Type option. The existing
> behavior in QEMU is to automatically guess a drive type based on the
> media inserted, or if a diskette is not present, arbitrarily assign one.
>
> This behavior can be described as
From: John Snow
Always report full_backing_filename, even if it's the same as
backing_filename. In the next patch, full_backing_filename may be
omitted if it cannot be generated instead of allowing e.g. drive_query
to abort if it runs into this scenario.
The presence or
From: Bo Tu
Now, s390-virtio-ccw is default machine and s390-ccw.img is default boot
loader. If the s390-virtio-ccw machine finds no device to load from and
errors out, then emits a panic and exits the vm. This breaks test cases
068 for s390x.
Adding the parameter of
John Snow writes:
> Currently, fd_revalidate is called in two different places, with two
> different expectations of behavior:
>
> (1) On initialization, as a routine to help pick the drive type and
> initial geometries as a side-effect of the pick_geometry routine
>
> (2)
John Snow writes:
> Add the fallback drive type as an option so we can control
> the behavior as a function of the QEMU machine version.
What's a "fallback drive type", and what does (or will) it do?
>
> Signed-off-by: John Snow
> ---
> hw/block/fdc.c | 23
This is doing a more complete test on setting cache modes both while
opening an image (i.e. in a -drive command line) and in reopen
situations. It checks that reopen can specify options for child nodes
and that cache modes are correctly inherited from parent nodes where
they are not specified.
From: Bo Tu
Replacing awk with sed, then it's easier to read.
Replacing "[ ! -z "$default_alias_machine" ]" with
"[[ $default_alias_machine ]]", then it's slightly shorter.
Reviewed-by: Max Reitz
Suggested-By: Sascha Silbe
From: Max Reitz
If a reference count is not representable with the current refcount
order, the image check should point to qemu-img amend for increasing the
refcount order. However, qemu-img amend needs write access to the image
which cannot be provided if the image is marked
bdrv_replace_in_backing_chain() asserts that not both old and new
BlockDdriverState have a BlockBackend attached to them because both
would have to end up pointing to the new BDS and we don't support more
than one BB per BDS yet.
Before we can safely allow references to existing nodes as backing
qcow2 accepts a few driver-specific options that overlap semantically
(e.g. "overlap-check" is an alias of "overlap-check.template", and any
missing cache size option is derived from the given ones).
When bdrv_reopen() merges the set of updated options with left out
options that should be kept at
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Alberto Garcia
Signed-off-by: Kevin Wolf
---
block/qcow2.c | 4 ++--
From: Max Reitz
If there is more than one time-consuming operation to be performed for
qcow2_amend_options(), we need an intermediate CB which coordinates the
progress of the individual operations and passes the result to the
original status callback.
Signed-off-by: Max Reitz
On 18 December 2015 at 15:07, Kevin Wolf wrote:
> The following changes since commit 67a708406221f476c0f8fa60c192c186150c5185:
>
> Merge remote-tracking branch
> 'remotes/berrange/tags/pull-io-channel-base-2015-12-18-1' into staging
> (2015-12-18 12:42:10 +)
>
> are
If the child was defined in the same context (-drive argument or
blockdev-add QMP command) as its parent, a reopen of the parent should
work the same and allow changing options of the child.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by:
For bs->file, using references to existing BDSes has been possible for a
while already. This patch enables the same for bs->backing.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block.c | 48
From: Max Reitz
Add tests for conversion between different refcount widths.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/112 | 109
This is a basic test for specifying cache modes for child nodes on the
command line. It doesn't take much time and works without O_DIRECT
support.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
tests/qemu-iotests/051 | 10 +++-
From: Fam Zheng
Signed-off-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/094 | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
index 27a2be2..57a68f8
Just some bits I discovered while going through the Coverity report.
(The issue reported by Coverity actually was not an issue.)
Max Reitz (2):
vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries()
vhdx: Simplify vhdx_set_shift_bits()
block/vhdx.c | 18 ++
1 file changed, 6
bs->options doesn't only contain options that the user explicitly
requested, but also option that were derived from flags, the filename or
inherited from the parent node.
For reopen, it is important to know the difference because reopening the
parent can change inherited values in child nodes,
We have DIV_ROUND_UP(), so we can use it to produce more easily readable
code. It may be slower than the bit shifting currently performed
(because it actually performs a division), but since
vhdx_calc_bat_entries() is never used in a hot path, this is completely
fine.
Signed-off-by: Max Reitz
From: Max Reitz
Add an opaque value which is to be passed to the bdrv_amend_options()
status callback.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Alberto Garcia
On 12/18/2015 10:54 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> This patch adds a new explicit Floppy Drive Type option. The existing
>> behavior in QEMU is to automatically guess a drive type based on the
>> media inserted, or if a diskette is not present,
On 16.12.2015 10:54, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/095 | 12 ++--
> tests/qemu-iotests/095.out | 8
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tests/qemu-iotests/095
From: Max Reitz
Progress may regress; this should be displayed correctly by
qemu_progress_print().
While touching that area of code, drop the redundant parentheses in the
same condition.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
From: Bo Tu
The tests for ide device should only be tested for the pc
platform.
Set device_id to "drive0", and replace every "-drive file..."
by "-drive file=...,if=none,id=$device_id", then x86 and s390x
can get the common output in the test of "Snapshot mode".
Warning
On 20.11.2015 11:12, Fam Zheng wrote:
> The "pnum < nb_sectors" condition in deciding whether to actually copy
> data is unnecessarily strict, and the qiov initialization is
> unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard.
>
> Rewrite mirror_iteration to fix both flaws.
>
>
Options are not actually inherited from the parent node yet, but this
commit lays the grounds for doing so.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block.c | 52 ---
From: Fam Zheng
The function has gone.
Signed-off-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
include/block/block.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/block/block.h b/include/block/block.h
index bce0d86..db8e096
On 12/18/2015 10:57 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> Add the fallback drive type as an option so we can control
>> the behavior as a function of the QEMU machine version.
>
> What's a "fallback drive type", and what does (or will) it do?
>
I assume you
From: John Snow
For more complex BDS trees that can be created under normal circumstances,
we lose the ability to issue query commands because of our inability to
re-construct the absolute filename.
Instead, omit this field when it is a problem and present as much information
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Signed-off-by: Kevin Wolf
---
block/qcow2.c
On 20.11.2015 11:12, Fam Zheng wrote:
> The three lines are duplicated a number of times now, refactor a
> function.
>
> Signed-off-by: Fam Zheng
> ---
> block/mirror.c | 24
> 1 file changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Max Reitz
From: John Snow
Disambiguate "Backing filename and full backing filename are equivalent"
from "full backing filename could not be determined."
Signed-off-by: John Snow
Message-id: 1450122916-4706-4-git-send-email-js...@redhat.com
Reviewed-by: Max Reitz
The code already special-cased "node-name", which is currently the only
option passed in the QDict that isn't driver-specific. Generalise the
code to take all general block layer options into consideration.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Instead of passing a separate drv argument to bdrv_open_common(), just
make sure that a "driver" option is set in the QDict. This also means
that a "driver" entry is consistently present in bs->options now.
This is another step towards keeping all options in the QDict (which is
the represenation
Traditionally, aio=native was treated as an advice that could simply be
ignored if an error occurs while initialising Linux AIO or the feature
wasn't compiled in. This behaviour was deprecated in commit 96518254
(qemu 2.3; error during init) and commit 1501ecc1 (qemu 2.5; not
compiled in).
This
The next patch distinguishes options that were explicitly set and
options that were derived. bdrv_fill_option() added options of both
types: Options given by json: syntax should be counted as explicit, but
the rest is derived.
In preparation for the distinction, move json: parse to a separate
From: John Snow
Don't create two interfaces to the same drive in the recently moved
failure test.
Signed-off-by: John Snow
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/124 | 26 ++
1 file changed, 14
From: Max Reitz
If the image version should be upgraded, that is the first we should do;
if it should be downgraded, that is the last we should do. So split the
version change block into an upgrade part at the start and a downgrade
part at the end.
Signed-off-by: Max Reitz
From: John Snow
...But only if we have the backing_filename. It means something Scary
happened and we can't really be quite exactly sure if we can trust the
backing_filename.
Signed-off-by: John Snow
Reviewed-by: Max Reitz
Message-id:
For values which are powers of two (and we do assume all of these to
be), sizeof(x) * 8 - 1 - clz(x) == ctz(x). Therefore, use ctz().
Signed-off-by: Max Reitz
---
block/vhdx.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/vhdx.c
Some drivers have nested options (e.g. blkdebug rule arrays), which
don't belong to a child node and shouldn't be removed. Don't remove all
options with "." in their name, but check for the complete prefixes of
actually existing child nodes.
Signed-off-by: Kevin Wolf
Specifying the cache mode for a driver without a medium is not a useful
thing to do: As long as there is no medium, the cache mode doesn't make
a difference, and once the 'change' command is used to insert a medium,
it ignores the old cache mode and makes the new medium use
cache=writethrough.
On 12/16/2015 05:50 PM, John Snow wrote:
> In working through a prototype to enable multiple block jobs. A few
> problem spots in our API compatibility become apparent.
>
> qmp_query_block_jobs
>
> Let's consider using a new command. I'm not sure if this is strictly
> possible with
From: Max Reitz
Add a function qcow2_change_refcount_order() which allows changing the
refcount order of a qcow2 image.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
From: Paolo Bonzini
Do not use bdrv_drain, since by itself it does not guarantee
anything.
Signed-off-by: Paolo Bonzini
Reviewed-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
block/snapshot.c | 23
Just reopening the children (as block.c does now) is enough.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/blkdebug.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/block/blkdebug.c
In order to decide whether a blkdebug: filename can be produced or a
json: one is necessary, blkdebug checked whether bs->options had more
options than just "config", "x-image" or "image" (the latter including
nested options). That doesn't work well when generic block layer options
are present.
The interesting part of reopening an image is from which sources the
effective options should be taken, i.e. which options take precedence
over which other options. This patch documents the precedence that will
be implemented in the following patches.
It also refactors bdrv_reopen_queue(), so
From: Max Reitz
Make use of qcow2_change_refcount_order() to support changing the
refcount order with qemu-img amend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
block/qcow2.c | 44
On 12/16/2015 03:16 PM, John Snow wrote:
> Code motion: I want to refactor this function to work with FDrive
> directly, so shuffle it below that definition.
>
> Signed-off-by: John Snow
> ---
> hw/block/fdc.c | 90
> +-
'node-name' and 'driver' should not be changed during a reopen
operation. It is, however, valid to specify them with the same value as
they already had.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
tests/qemu-iotests/133 | 90
From: Paolo Bonzini
When called from a coroutine, bdrv_ioctl must be asynchronous just like
e.g. bdrv_flush. The code was incorrectly making it synchronous, fix
it.
Signed-off-by: Paolo Bonzini
Reviewed-by: Fam Zheng
Signed-off-by:
On 16.12.2015 10:54, Fam Zheng wrote:
> Commit 794d00f71d fixed two "mv" commands into the TEST_IMG override approach.
> There are still more occasions of "mv", this series fixes them.
>
> The benefit is it drops the assumption that the created image is a single
> file,
> which is not true for
On 12/18/2015 11:11 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> Currently, fd_revalidate is called in two different places, with two
>> different expectations of behavior:
>>
>> (1) On initialization, as a routine to help pick the drive type and
>> initial
https://patchwork.ozlabs.org/patch/555945/
On Dec 11, 2015, at 10:27 PM, Programmingkid wrote:
> Mac OS X can be picky when it comes to allowing the user
> to use physical devices in QEMU. Most mounted volumes
> appear to be off limits to QEMU. If an issue is detected,
> a message is displayed
Am 16.12.2015 um 07:25 hat Jeff Cody geschrieben:
> Background:
>
> Block jobs, and other QAPI operations, may modify and impact the
> BlockDriverState graph in QEMU. In order to support multiple
> operations safely, we need a mechanism to block and gate operations,
>
> We currently
On 12/11/2015 06:23 PM, John Snow wrote:
>
ping
>
> On 12/10/2015 10:27 PM, Eric Blake wrote:
>> On my machine, './check -qcow2 028' was failing about 80% of the
>> time, due to a race in how many times the repeated attempts
>> to run 'info block-jobs' could occur before the job was done,
>>
On 12/18/2015 02:24 PM, John Snow wrote:
>> To be subclassable, we need a flat union, and the discriminator must be
>> non-optional within that union. Either 'options' is that flat union
>> (and we have a layer of {} nesting in QMP}, or we directly make the
>> 'data' of job-cancel be the flat
On 12/18/2015 03:46 PM, Eric Blake wrote:
> On 12/11/2015 06:23 PM, John Snow wrote:
>>
>
> ping
>
>>
>> On 12/10/2015 10:27 PM, Eric Blake wrote:
>>> On my machine, './check -qcow2 028' was failing about 80% of the
>>> time, due to a race in how many times the repeated attempts
>>> to run
On 12/18/2015 01:07 PM, Eric Blake wrote:
> On 12/16/2015 05:50 PM, John Snow wrote:
>> In working through a prototype to enable multiple block jobs. A few
>> problem spots in our API compatibility become apparent.
>>
>
>> qmp_query_block_jobs
>>
>
>> Let's consider using a new
On Fri, Dec 18, 2015 at 03:19:25PM +0100, Kevin Wolf wrote:
> Am 16.12.2015 um 07:25 hat Jeff Cody geschrieben:
> > Background:
> >
> > Block jobs, and other QAPI operations, may modify and impact the
> > BlockDriverState graph in QEMU. In order to support multiple
> > operations
70 matches
Mail list logo