On Mon, Jun 11, 2018 at 10:51:58PM +0200, Max Reitz wrote:
> qcow only supports a single encryption (and there is no reason why that
> would change in the future), so we can make it the default.
>
> Signed-off-by: Max Reitz
> ---
> qapi/block-core.json | 3 ++-
> 1 file changed, 2 insertions(+),
On Mon, Jun 11, 2018 at 10:51:57PM +0200, Max Reitz wrote:
> Currently, you can give no encryption format for a qcow2 file while
> still passing a key-secret. That does not conform to the schema, so
> this patch changes the schema to allow it.
>
> Signed-off-by: Max Reitz
> ---
> qapi/block-cor
On Mon, Jun 11, 2018 at 10:52:03PM +0200, Max Reitz wrote:
> Remove the encrypt.format option from the two blockdev-add test cases
> for encrypted qcow2 images in 087 to explicitly test that this parameter
> is now optional.
>
> Additionally, show that explicitly specifying encrypt.format=auto wor
Am 12.06.2018 um 00:03 hat Eric Blake geschrieben:
> On 06/11/2018 04:39 PM, Eric Blake wrote:
> > Although qemu-img creates aligned files (by rounding up), it
> > must also gracefully handle files that are not sector-aligned.
> > Test that the bug fixed in the previous patch does not recur.
> >
>
09.06.2018 18:32, Vladimir Sementsov-Ogievskiy wrote:
Implement reconnect. To achieve this:
1. Move from quit bool variable to state. 4 states are introduced:
connecting-wait: means, that reconnecting is in progress, and there
were small number of reconnect attempts, so all requests ar
On Thu, Jun 07, 2018 at 05:33:03PM -0400, Jeff Cody wrote:
> On Thu, Jun 07, 2018 at 08:25:40AM +0200, Markus Armbruster wrote:
> > This series is RFC because:
> >
> > * It clashes with parts of Max's "[PATCH 00/13] block: Try to create
> > well typed json:{} filenames". I missed that one until
Signed-off-by: Markus Armbruster
---
tests/check-block-qdict.c | 57 ---
1 file changed, 29 insertions(+), 28 deletions(-)
diff --git a/tests/check-block-qdict.c b/tests/check-block-qdict.c
index 5b9f4d506e..29f58a2d3d 100644
--- a/tests/check-block-qdict.c
++
PATCH 01-17 are configuration fixes and cleanup, in particular
-blockdev driver=nfs,... and -drive driver=(nbd|sheepdog|ssh),... with
non-string scalars.
PATCH 18-19 provide support for configuring rbd authentication.
I'm happy to split the series if that helps.
Since the RFC post, I amended the
qdict_flatten_qdict() skips copying scalars from @qdict to @target
when the two are the same. Fair enough, but it uses a non-obvious
test for "same". Replace it by the obvious one. While there, improve
comments.
Signed-off-by: Markus Armbruster
---
qobject/block-qdict.c | 14 +-
1
Parameter "filename" is deprecated since commit 5c3ad1a6a8f, v2.10.0.
Time to get rid of it.
Signed-off-by: Markus Armbruster
---
block/iscsi.c | 23 ++-
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index c2fbd8a8aa..7e3ea72bd2
Signed-off-by: Markus Armbruster
---
qobject/block-qdict.c | 27 +++
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
index 35e9052816..f24bea30e1 100644
--- a/qobject/block-qdict.c
+++ b/qobject/block-qdict.c
@@
The following pattern occurs in the .bdrv_co_create_opts() methods of
parallels, qcow, qcow2, qed, vhdx and vpc:
qobj = qdict_crumple_for_keyval_qiv(qdict, errp);
qobject_unref(qdict);
qdict = qobject_to(QDict, qobj);
if (qdict == NULL) {
ret = -EINVAL;
goto done;
Parameter "filename" is deprecated since commit 91589d9e5ca, v2.10.0.
Time to get rid of it.
Signed-off-by: Markus Armbruster
---
block/rbd.c | 16
1 file changed, 16 deletions(-)
diff --git a/block/rbd.c b/block/rbd.c
index a16431e267..40c6e4185f 100644
--- a/block/rbd.c
+++ b
Configuration flows through the block subsystem in a rather peculiar
way. Configuration made with -drive enters it as QemuOpts.
Configuration made with -blockdev / blockdev-add enters it as QAPI
type BlockdevOptions. The block subsystem uses QDict, QemuOpts and
QAPI types internally. The precise
Legacy -drive supports "password-secret" parameter that isn't
available with -blockdev / blockdev-add. That's because we backed out
our first try to provide it there due to interface design doubts, in
commit 577d8c9a811, v2.9.0.
This is the second try. It brings back the parameter, except it's
n
There's no need to restart the loop. We don't elsewhere, e.g. in
qdict_extract_subqdict(), qdict_join() and qemu_opts_absorb_qdict().
Simplify accordingly.
Signed-off-by: Markus Armbruster
---
qobject/block-qdict.c | 18 +++---
1 file changed, 3 insertions(+), 15 deletions(-)
diff
Signed-off-by: Markus Armbruster
---
tests/check-block-qdict.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/check-block-qdict.c b/tests/check-block-qdict.c
index 29f58a2d3d..2da16f01a6 100644
--- a/tests/check-block-qdict.c
+++ b/tests/check-block-qdict
The previous commit fixed -blockdev breakage due to misuse of the
qobject input visitor's keyval flavor in bdrv_file_open(). The commit
message explain why using the plain flavor would be just as wrong; it
would break -drive. Turns out we break it in three places:
nbd_open(), sd_open() and ssh_fi
Remaining uses of qobject_input_visitor_new_keyval() in the block
subsystem:
* block_crypto_create_opts_init()
Currently doesn't visit any non-string scalars, thus safe. It's
called from
- block_crypto_open_luks()
Creates the QDict with qemu_opts_to_qdict_filtered(), which
creates o
When you mix scalar and non-scalar keys, whether you get an "already
set as scalar" or an "already set as dict" error depends on qdict
iteration order. Neither message makes much sense. Replace by
""Cannot mix scalar and non-scalar keys". This is similar to the
message we get for mixing list and
Parameter auth-client-required lets you configure authentication
methods. We tried to provide that in v2.9.0, but backed out due to
interface design doubts (commit 46fcc16).
This commit is similar to what we backed out, but simpler: we use a
list of enumeration values instead of a list of obj
-blockdev and blockdev-add silently ignore empty objects and arrays in
their argument. That's because qmp_blockdev_add() converts the
argument to a flat QDict, and qdict_flatten() eats empty QDict and
QList members. For instance, we ignore an empty BlockdevOptions
member @cache. No real harm, as
Signed-off-by: Markus Armbruster
---
block/nbd.c | 7 ++-
block/nfs.c | 7 ++-
block/parallels.c | 7 ++-
block/qcow.c | 7 ++-
block/qcow2.c | 7 ++-
block/qed.c | 7 ++-
block/rbd.c | 7 ++-
block/sh
From: Max Reitz
There are numerous QDict functions that have been introduced for and are
used only by the block layer. Move their declarations into an own
header file to reflect that.
While qdict_extract_subqdict() is in fact used outside of the block
layer (in util/qemu-config.c), it is still
Pure code motion, except for two brace placements and a comment
tweaked to appease checkpatch.
Signed-off-by: Markus Armbruster
---
MAINTAINERS | 2 +
qobject/Makefile.objs | 1 +
qobject/block-qdict.c | 640 +
qobject/qdict.c
On Tue, Jun 12, 2018 at 02:58:21PM +0200, Markus Armbruster wrote:
> Legacy -drive supports "password-secret" parameter that isn't
> available with -blockdev / blockdev-add. That's because we backed out
> our first try to provide it there due to interface design doubts, in
> commit 577d8c9a811, v2
Max Reitz writes:
> In its current form, qdict_flatten() removes all entries from nested
> QDicts that are moved to the root QDict. It is completely sufficient to
> remove all old entries from the root QDict, however. If the nested
> dicts have a refcount of 1, this will automatically delete th
Max Reitz writes:
> This new test verifies that qdict_flatten() does not modify a shallow
> clone of the given QDict.
>
> Reviewed-by: Eric Blake
> Signed-off-by: Max Reitz
Reviewed-by: Markus Armbruster
Am 07.06.2018 um 08:25 hat Markus Armbruster geschrieben:
> Configuration flows through the block subsystem in a rather peculiar
> way. Configuration made with -drive enters it as QemuOpts.
> Configuration made with -blockdev / blockdev-add enters it as QAPI
> type BlockdevOptions. The block subs
Am 07.06.2018 um 08:25 hat Markus Armbruster geschrieben:
> Remaining uses of qobject_input_visitor_new_keyval() in the block
> subsystem:
>
> * block_crypto_create_opts_init()
> Currently doesn't visit any non-string scalars, thus safe. It's
> called from
> - block_crypto_open_luks()
>
09.06.2018 18:32, Vladimir Sementsov-Ogievskiy wrote:
Implement reconnect. To achieve this:
1. Move from quit bool variable to state. 4 states are introduced:
connecting-wait: means, that reconnecting is in progress, and there
were small number of reconnect attempts, so all requests ar
Am 12.06.2018 um 14:58 hat Markus Armbruster geschrieben:
> PATCH 01-17 are configuration fixes and cleanup, in particular
> -blockdev driver=nfs,... and -drive driver=(nbd|sheepdog|ssh),... with
> non-string scalars.
>
> PATCH 18-19 provide support for configuring rbd authentication.
>
> I'm hap
Am 12.06.2018 um 14:58 hat Markus Armbruster geschrieben:
> From: Max Reitz
>
> There are numerous QDict functions that have been introduced for and are
> used only by the block layer. Move their declarations into an own
> header file to reflect that.
>
> While qdict_extract_subqdict() is in fa
Max Reitz writes:
> This patch allows specifying a discriminator that is an optional member
> of the base struct. In such a case, a default value must be provided
> that is used when no value is given.
Hmm. Can you explain why you need this feature?
> Signed-off-by: Max Reitz
> ---
> qapi/i
Am 12.06.2018 um 14:58 hat Markus Armbruster geschrieben:
> When you mix scalar and non-scalar keys, whether you get an "already
> set as scalar" or an "already set as dict" error depends on qdict
> iteration order. Neither message makes much sense. Replace by
> ""Cannot mix scalar and non-scalar
On 06/11/2018 06:43 PM, John Snow wrote:
> requires: 20180606182449.1607-1-js...@redhat.com
No longer requires any prerequisites.
--js
>
> See patch for details; this is somewhat an RFC that I suspect
> will be useful for libvirt in some situations, but maybe it's
> actually overkill.
>
> J
Kevin Wolf writes:
> Am 07.06.2018 um 08:25 hat Markus Armbruster geschrieben:
>> Configuration flows through the block subsystem in a rather peculiar
>> way. Configuration made with -drive enters it as QemuOpts.
>> Configuration made with -blockdev / blockdev-add enters it as QAPI
>> type Block
Kevin Wolf writes:
> Am 07.06.2018 um 08:25 hat Markus Armbruster geschrieben:
>> Remaining uses of qobject_input_visitor_new_keyval() in the block
>> subsystem:
>>
>> * block_crypto_create_opts_init()
>> Currently doesn't visit any non-string scalars, thus safe. It's
>> called from
>> -
Kevin Wolf writes:
> Am 12.06.2018 um 14:58 hat Markus Armbruster geschrieben:
>> From: Max Reitz
>>
>> There are numerous QDict functions that have been introduced for and are
>> used only by the block layer. Move their declarations into an own
>> header file to reflect that.
>>
>> While qdi
Am 12.06.2018 um 14:58 hat Markus Armbruster geschrieben:
> PATCH 01-17 are configuration fixes and cleanup, in particular
> -blockdev driver=nfs,... and -drive driver=(nbd|sheepdog|ssh),... with
> non-string scalars.
>
> PATCH 18-19 provide support for configuring rbd authentication.
>
> I'm hap
Daniel P. Berrangé writes:
> On Tue, Jun 12, 2018 at 02:58:21PM +0200, Markus Armbruster wrote:
>> Legacy -drive supports "password-secret" parameter that isn't
>> available with -blockdev / blockdev-add. That's because we backed out
>> our first try to provide it there due to interface design d
First: this variable was introduced to handle reopens. We need it on
following qcow2_do_open, to don't try loading bitmaps again. So, we are
fixing qcow2_invalidate_cache().
However, if we fix only qcow2_invalidate_cache, iotest 169 fails on
case test__persistent__not_migbitmap__online_shared, bec
On 05/05/2018 03:49 AM, Ivan Ren wrote:
> qemu-img info with a block device which has a qcow2 format always
> return 0 for disk size, and this can not reflect the qcow2 size
> and the used space of the block device. This patch return the
> allocated size of qcow2 as the disk size.
>
This has h
Hi all!
I've faced the following problem:
1. create image with dirty bitmap, a.qcow2 (start qemu and run qmp
command block-dirty-bitmap-add)
2. run the following commands:
qemu-img create -f qcow2 -b a.qcow2 b.qcow2 10M
qemu-io -c 'write 0 512' b.qcow2
qemu-
Jeff Cody writes:
> On Thu, Jun 07, 2018 at 05:33:03PM -0400, Jeff Cody wrote:
>> Here are some results from auth testing of various combinations; I haven't
>> completed all the combinations in my matrix yet, but what I have completed
>> looks like what I would expect.
>>
>> These were all teste
On 06/10/2018 03:14 PM, Philippe Mathieu-Daudé wrote:
> xen_pv_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename
> \"%s\","
> - " size %" PRId64 " (%" PRId64 " MB)\n",
> + " size %" PRId64 " (%llu MB)\n",
>blkdev->type, blkdev->fi
On 06/12/2018 03:51 PM, Richard Henderson wrote:
On 06/10/2018 03:14 PM, Philippe Mathieu-Daudé wrote:
xen_pv_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename \"%s\","
- " size %" PRId64 " (%" PRId64 " MB)\n",
+ " size %" PRId64 " (%llu MB)\n",
On 06/12/2018 11:04 AM, Eric Blake wrote:
> On 06/12/2018 03:51 PM, Richard Henderson wrote:
>> On 06/10/2018 03:14 PM, Philippe Mathieu-Daudé wrote:
>>> xen_pv_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename
>>> \"%s\","
>>> - " size %" PRId64 " (%" PRId64 " MB)\n
On 06/12/2018 01:26 PM, Vladimir Sementsov-Ogievskiy wrote:
> First: this variable was introduced to handle reopens. We need it on
> following qcow2_do_open, to don't try loading bitmaps again. So, we are
> fixing qcow2_invalidate_cache().
>
> However, if we fix only qcow2_invalidate_cache, iot
On 06/12/2018 06:11 PM, John Snow wrote:
>
>
> On 06/12/2018 01:26 PM, Vladimir Sementsov-Ogievskiy wrote:
>> First: this variable was introduced to handle reopens. We need it on
>> following qcow2_do_open, to don't try loading bitmaps again. So, we are
>> fixing qcow2_invalidate_cache().
>>
>
Resizing a disk on the fly is useful, including for Xen guests.
Xen has this capability, except in the case of qdisks (Xen QEMU disks).
This patch series intends to provide this capability. With these
patches, the xl command "qemu-monitor-command" can be used in
conjunction with the "info block" an
Provide monitor naming of xen disks, including associating an
attached dev_id for a BlockBackend which has legacy_dev set.
Currently, only xen disks have legacy_dev set to true.
Signed-off-by: Bruce Rogers
---
block/block-backend.c | 5 -
hw/block/xen_disk.c | 15 +++
include/
In the context of a monitor based disk resize, provide notification
of the new size to the front end xen block driver via a xenstore update.
Signed-off-by: Bruce Rogers
---
block/block-backend.c | 7 +++
blockdev.c | 8
hw/block/xen_disk.c| 9
For bitmaps that we succeeded in loading, we can cache a reference
to that object. This will let us iterate over the more convenient
form of in-memory bitmaps for qemu-img bitmap manipulation tools.
Signed-off-by: John Snow
---
block/qcow2-bitmap.c | 2 ++
1 file changed, 2 insertions(+)
diff -
We only have one type of persistent bitmap right now, but I'd like the
qemu-img tool to be able to give good diagnostic information if it sees
an unknown/unsupported type.
We do enforce it to be the dirty tracking type in check_dir_entry, but
I wanted positive affirmation of the type in the forthc
Presently, an image with IN_USE bitmaps cannot be loaded as RO.
In preparation for changing that, IN_USE bitmaps ought to create an
error on reload instead of being skipped.
While we're here, update the function to work with two new facts:
- All bm_list entries will have a BdrvDirtyBitmap (becaus
We always call it with the same fields of the struct we always pass.
We can split this out later if we really wind up needing to.
Signed-off-by: John Snow
---
block/qcow2-bitmap.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/block/qcow2-bitmap.c b/
Instead of always setting IN_USE, do this conditionally based on
whether or not the bitmap is read-only. Eliminate the two-pass
processing and move the second loop to the failure case.
This will allow us to show the flags exactly as they appear
on-disk for bitmaps in `qemu-img info`.
Signed-off-b
Similarly to the last patch, track the extra_data_size field that we read.
We do reject anything other than zero, but if this restriction is lifted
in the future, we'll need to update the _info field, so loosen this now.
Signed-off-by: John Snow
---
block/qcow2-bitmap.c | 4 +++-
1 file changed,
We don't need to re-read this list every time, exactly. We can keep it cached
and delete our copy when we flush to disk.
Because we don't try to flush bitmaps on close if there's nothing to flush,
add a new conditional to delete the state anyway for a clean exit.
Signed-off-by: John Snow
---
bl
Add some of the necessary scaffolding for reporting bitmap information.
Signed-off-by: John Snow
---
qapi/block-core.json | 64 +++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index fff
For the purposes of qemu-img manipulation and querying of bitmaps, load
bitmaps that are "in use" -- if the image is read only. This will allow
us to diagnose problems with this flag using the qemu-img tool.
Signed-off-by: John Snow
---
block/qcow2-bitmap.c | 32 +++-
Allow qemu-img to show information about bitmaps stored in qcow2 images.
v2:
- Remove bitmap manipulation command in favor of a part 2 series later
- Responded to much of Vladimir's feedback (Thank you!);
- In particular, make sure IN_USE bitmaps cannot be remounted RW.
- Fixed semantics of th
Add functions for querying the basic information inside of bitmaps.
Restructure the bitmaps flags masks to facilitate providing a list of
flags belonging to the bitmap(s) being queried.
Signed-off-by: John Snow
---
block/qcow2-bitmap.c | 86 ++--
b
64 matches
Mail list logo