[PATCH 12/27] qapi job: Elide redundant has_FOO in generated C

2022-09-15 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- job-qmp.c | 3 +-- scripts/qapi/schema.py | 1 - 2 files changed, 1 inser

[PATCH 08/27] qapi block: Elide redundant has_FOO in generated C

2022-09-15 Thread Markus Armbruster
and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- block/block-backend.c | 2 +- block/copy-before-write.c | 2 +- block/dirty-bitmap.c | 1 - block/export/export.c | 2 +- bloc

[PATCH 00/27] qapi: Elide redundant has_FOO in generated C

2022-09-15 Thread Markus Armbruster
Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Pavel Dovgalyuk Cc: Philippe Mathieu-Daudé Cc: Stefan Berger Cc: Vladimir Sementsov-Ogievskiy Cc: Yanan Wang Cc: qemu-block@nongnu.org Markus Armbruster (27): docs/devel/qapi-code-gen: Update example to match current code qapi: Tidy u

[PATCH 24/27] qapi transaction: Elide redundant has_FOO in generated C

2022-09-15 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- blockdev.c | 3 +-- scripts/qapi/schema.py | 1 - 2 files changed, 1 insertion(+), 3

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Markus Armbruster
Alistair Francis writes: > On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: >> >> SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to >> inherit from TYPE_MACHINE. This is an inconsistency which can cause >> undefined behavior such as memory corruption. >> >> Change S

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread Markus Armbruster
Wang Liang writes: > On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote: >> On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: >> > From: Wang Liang >> > >> > The delay time should never be a negative value. >> > >> > -return limit->slice_end_time - now; >> > +return M

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Markus Armbruster
Bernhard Beschow writes: > Am 20. September 2022 11:36:47 UTC schrieb Markus Armbruster > : >>Alistair Francis writes: >> >>> On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: >>>> >>>> SiFiveEState inherits from SysBusDevice

Re: [PATCH v1 01/10] monitor: expose monitor_puts to rest of code

2022-09-21 Thread Markus Armbruster
lain "%s" printfs to use the _puts api. > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson Reviewed-by: Markus Armbruster

Re: [PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Sep 20, 2022 at 2:47 PM Bin Meng wrote: > >> From: Bin Meng >> >> Lots of test cases were written to use hardcoded /tmp directory for >> temporary files. To avoid this, we update them to use g_dir_make_tmp() >> or g_file_open_tmp() when appropriate. >>

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-23 Thread Markus Armbruster
Alberto Garcia writes: > On Wed 21 Sep 2022 09:47:32 AM +08, Wang Liang wrote: >>> > -return limit->slice_end_time - now; >>> > +return MAX(limit->slice_end_time - now, 0); >>> >>> How can this be negative? slice_end_time is guaranteed to be larger >>> than >>> now: >>> >>> if (limi

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-26 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1); > ... > ret = get_tmp_

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-26 Thread Markus Armbruster
Bin Meng writes: > On Mon, Sep 26, 2022 at 6:13 PM Markus Armbruster wrote: >> >> Bin Meng writes: >> >> > From: Bin Meng >> > >> > At present there are two callers of get_tmp_filename() and they are >> > inconsistent. >> > &g

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-27 Thread Markus Armbruster
Bin Meng writes: > Hi Markus, > > On Tue, Sep 27, 2022 at 2:22 PM Markus Armbruster wrote: >> >> Bin Meng writes: >> >> > On Mon, Sep 26, 2022 at 6:13 PM Markus Armbruster >> > wrote: >> >> >> >> Bin Meng writes: >>

Re: [PATCH v5 02/12] blkio: add libblkio block driver

2022-09-27 Thread Markus Armbruster
> > and: > > --blockdev > virtio-blk-vhost-vdpa,node-name=drive0,path=/dev/vdpa...,readonly=on|off > > Signed-off-by: Stefan Hajnoczi > Acked-by: Markus Armbruster [...] > diff --git a/qapi/block-core.json b/qapi/block-core.json > index f2

Re: [PATCH v4] block: Refactor get_tmp_filename()

2022-09-28 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1); > ... > ret = get_tmp_

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-28 Thread Markus Armbruster
Damien Le Moal writes: > On 9/1/22 23:57, Markus Armbruster wrote: >> Sam Li writes: >> >>> Markus Armbruster 于2022年8月31日周三 16:35写道: >>>> >>>> Sam Li writes: >>>> >>>>> Markus Armbruster 于2022年8月30日周二 19:57写道: [.

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-09-29 Thread Markus Armbruster
Akihiko Odaki writes: > On Mon, Sep 5, 2022 at 6:26 PM Markus Armbruster wrote: >> >> Akihiko Odaki writes: >> >> > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster wrote: >> >> >> >> Akihiko Odaki writes: >> >> >> >&

Re: [PATCH v5 1/2] block: Ignore close() failure in get_tmp_filename()

2022-09-29 Thread Markus Armbruster
ot;. > > Let's simply ignore close() failure here. > > Suggested-by: Markus Armbruster > Signed-off-by: Bin Meng > --- > > Changes in v5: > - new patch: "block: Ignore close() failure in get_tmp_filename()" > > block.c | 5 + > 1 file cha

Re: [PATCH v5 2/2] block: Refactor get_tmp_filename()

2022-09-29 Thread Markus Armbruster
> > char *create_tmp_file(Error **errp) > > and use g_file_open_tmp() for a consistent implementation. > > Signed-off-by: Bin Meng Reviewed-by: Markus Armbruster

Re: [PATCH v6 02/13] blkio: add libblkio block driver

2022-10-07 Thread Markus Armbruster
> > and: > > --blockdev > virtio-blk-vhost-vdpa,node-name=drive0,path=/dev/vdpa...,readonly=on|off The patch also adds nvme-io_uring. Shouldn't the commit message mention it? > > Signed-off-by: Stefan Hajnoczi > Acked-by: Markus Armbruster > --- > MAIN

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Markus Armbruster
Paolo Bonzini writes: > blkdebug events can be called from either non-coroutine or coroutine > contexts. However, some actions (specifically suspend actions and > errors reported with immediately=off) only make sense from within > a coroutine. > > Currently, using those action would lead to an a

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 10/13/22 12:56, Markus Armbruster wrote: >> rule_check() is called from blkdebug_co_preadv(), blkdebug_co_pwritev(), >> blkdebug_co_pwrite_zeroes(), blkdebug_co_pdiscard(), >> blkdebug_co_block_status() (all marked coroutine_fn), and >> blkde

Re: [PATCH v2] qapi-gen: mark coroutine QMP command functions as coroutine_fn

2022-10-14 Thread Markus Armbruster
Paolo Bonzini writes: > Coroutine commands have to be declared as coroutine_fn, but the Reminder, because I had to look this up... A "coroutine command" is a command that has flag coroutine set, like so: { 'command': 'block_resize', 'data': { '*device': 'str', '*node-

[PATCH v2 24/28] qapi transaction: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- blockdev.c | 3 +-- scripts/qapi/schema.py | 1 - 2 files changed, 1 insertion(+), 3

[PATCH v2 12/28] qapi job: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov-Ogievskiy --- job-qmp.c | 3 +-- scripts/qapi/sch

[PATCH v2 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- block/block-backend.c | 2 +- block/copy-before-write.c | 2 +- block/dirty-bitmap.c | 1 - block/export/export.c | 2 +- bloc

[PULL 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20221018062849.3420573-9-arm...@redhat.com> --- block/block-backend.c | 2 +- block/copy-before-write.c | 2 +- block/dirty-bitmap.c

[PULL 12/28] qapi job: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20221018062849.3420573-13-arm.

[PULL 24/28] qapi transaction: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20221018062849.3420573-25-arm...@redhat.com> --- blockdev.c | 3 +

Re: [PATCH v2 16/17] virtio-pci: Omit errp for pci_add_capability

2022-10-25 Thread Markus Armbruster
Akihiko Odaki writes: > Signed-off-by: Akihiko Odaki I get "undefined reference to `pci_add_capability'" link errors. I believe that ... [...] > diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h > index 51fd106f16..2a5d4b329f 100644 > --- a/include/hw/pci/pci.h > +++ b/include/hw/pci

Re: [PATCH v2 02/17] hw/i386/amd_iommu: Omit errp for pci_add_capability

2022-10-25 Thread Markus Armbruster
Akihiko Odaki writes: > Signed-off-by: Akihiko Odaki > --- > hw/i386/amd_iommu.c | 21 - > 1 file changed, 4 insertions(+), 17 deletions(-) > > diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c > index 725f69095b..8a88cbea0a 100644 > --- a/hw/i386/amd_iommu.c > +++ b/hw

[PULL v2 24/28] qapi transaction: Elide redundant has_FOO in generated C

2022-10-26 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20221018062849.3420573-25-arm...@redhat.com> --- blockdev.c | 3 +

[PULL v2 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-26 Thread Markus Armbruster
and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20221018062849.3420573-9-arm...@redhat.com> [block/rbd.c fixed for #ifndef LIBRBD_SUPPORTS_ENCRYPTION] --- block/block-backend.c | 2 +-

[PULL v2 12/28] qapi job: Elide redundant has_FOO in generated C

2022-10-26 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20221018062849.3420573-13-arm.

Re: [PATCH v3 02/16] hw/i386/amd_iommu: Omit errp for pci_add_capability

2022-10-26 Thread Markus Armbruster
Akihiko Odaki writes: > Omitting errp for pci_add_capability() causes it to abort if > capabilities overlap. This behavior is appropriate heare because all of Typo: here Same for later patches. > the capabilities set in this device are defined in the program and > their overlap should not happ

Re: [PATCH] block/blkio: Make driver nvme-io_uring take a "path" instead of a "filename"

2022-10-28 Thread Markus Armbruster
Alberto Faria writes: > The nvme-io_uring driver expects a character special file such as > /dev/ng0n1. Follow the convention of having a "filename" option when a > regular file is expected, and a "path" option otherwise. I suspect this is by accident, not by design. Is it desirable? > This ma

[PATCH v3 09/30] nbd/server: Clean up abuse of BlockExportOptionsNbd member @arg

2022-11-04 Thread Markus Armbruster
used outside this function, use a local variable instead of modifying the QAPI object. Signed-off-by: Markus Armbruster Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org --- nbd/server.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --

[PATCH v3 08/30] blockdev: Clean up abuse of DriveBackup member format

2022-11-04 Thread Markus Armbruster
ead of modifying the QAPI object. Signed-off-by: Markus Armbruster Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org --- blockdev.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index 3f1dec6242..d6550e0dc8 100644 --- a/bl

[PATCH v3 14/30] qapi job: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
plains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow Cc: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov-Ogievskiy --- job-qmp.c | 3 +-- scripts/qapi/sch

[PATCH v3 10/30] qapi block: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
ency_histogram_stats() loses its output parameters and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- block/block-backend.c | 2 +- block/copy-before-write.c | 2 +- block/dirty-bitmap.c | 1 - b

[PATCH v3 26/30] qapi transaction: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
eitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- blockdev.c | 4 ++-- scripts/qapi/schema.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 59753400e9..75eef8535e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1048,7 +1

Re: [PATCH 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-09 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Make nvme_check_constraints() return an int and fix incorrect use of > errp/local_err. > > Signed-off-by: Klaus Jensen > --- > hw/nvme/ctrl.c | 48 +++- > 1 file changed, 23 insertions(+), 25 deletions(-)

Re: [PATCH 2/2] hw/nvme: cleanup error reporting in nvme_init_pci()

2022-11-09 Thread Markus Armbruster
port_err(*errp); > +*errp = NULL; > } else { > -error_propagate(errp, err); > -return ret; > +return -1; > } > } Suggest to reduce nesting: if (ret == -ENOTSUP) { warn_report_err(*errp); *errp = NULL; } else if (ret < 0) { return -1; } Entirely up to you. Reviewed-by: Markus Armbruster

Re: [PATCH 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-09 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Make nvme_check_constraints() return an int and fix incorrect use of > errp/local_err. > > Signed-off-by: Klaus Jensen One more question: what exactly do you mean by "incorrect use of errp/local_err"? Is it incorrect in the sense of "behaves badly

Re: [PATCH 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-09 Thread Markus Armbruster
Klaus Jensen writes: > On Nov 9 13:36, Markus Armbruster wrote: >> Klaus Jensen writes: >> >> > From: Klaus Jensen >> > >> > Make nvme_check_constraints() return an int and fix incorrect use of >> > errp/local_err. >> > >> >

Re: [PATCH v2 2/2] hw/nvme: cleanup error reporting in nvme_init_pci()

2022-11-10 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Replace the local Error variable with errp and ERRP_GUARD() and change > the return value to bool. > > Reviewed-by: Markus Armbruster > Signed-off-by: Klaus Jensen > --- > hw/nvme/ctrl.c | 23 ++

Re: [PATCH v2 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Make nvme_check_constraints() return a bool and fix an invalid error > propagation where the actual error is thrown away in favor of an unused > local Error value. Is it? I think you're talking about ... > Signed-off-by: Klaus Jensen > --- > hw/

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Remove an unnecessary local Error value in nvme_realize(). In the > process, change nvme_check_constraints() into returning a bool. > > Finally, removing the local Error value also fixes a bug where an error > returned from nvme_init_subsys() would b

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Markus Armbruster
Klaus Jensen writes: > On Nov 11 07:36, Markus Armbruster wrote: >> Klaus Jensen writes: >> >> > From: Klaus Jensen >> > >> > Remove an unnecessary local Error value in nvme_realize(). In the >> > process, change nvme_check_constraints() int

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-11 Thread Markus Armbruster
Klaus Jensen writes: > On Nov 11 07:55, Markus Armbruster wrote: >> Klaus Jensen writes: >> >> > On Nov 11 07:36, Markus Armbruster wrote: >> >> Klaus Jensen writes: >> >> >> >> > From: Klaus Jensen >> >>

Re: [Qemu-block] [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-12 Thread Markus Armbruster
Alberto Garcia writes: > On Tue 11 Oct 2016 06:32:39 PM CEST, Markus Armbruster wrote: > >>>> 3) QEMU could advertise that feature to the client. This is probably >>>> simpler than trying to figure it out from the API. I guess that's >>>> the idea

Re: [Qemu-block] [Qemu-devel] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Oct 06, 2016 at 05:51:57PM +0200, Kevin Wolf wrote: >> Am 06.10.2016 um 17:39 hat Daniel P. Berrange geschrieben: >> > On Thu, Oct 06, 2016 at 05:30:05PM +0200, Kevin Wolf wrote: >> > > Am 06.10.2016 um 17:18 hat Daniel P. Berrange geschrieben: >> > > > On T

Re: [Qemu-block] [Qemu-devel] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Some of the historical command line opts that had their > keys in in a completely flat namespace are now represented > by QAPI schemas that use a nested structs. When converting > the QemuOpts to QObject, there is no information about > compound types available, so

Re: [Qemu-block] [Qemu-devel] [PATCH v14 07/21] qapi: permit scalar type conversions in QObjectInputVisitor

2016-10-12 Thread Markus Armbruster
Markus Armbruster writes: > "Daniel P. Berrange" writes: > >> Currently the QObjectInputVisitor assumes that all scalar >> values are directly represented as the final types declared >> by the thing being visited. ie it assumes an 'int' is using >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 07/21] qapi: permit scalar type conversions in QObjectInputVisitor

2016-10-12 Thread Markus Armbruster
Markus Armbruster writes: > Markus Armbruster writes: > >> "Daniel P. Berrange" writes: >> >>> Currently the QObjectInputVisitor assumes that all scalar >>> values are directly represented as the final types declared >>> by the thing b

Re: [Qemu-block] [Qemu-devel] [PATCH v14 07/21] qapi: permit scalar type conversions in QObjectInputVisitor

2016-10-12 Thread Markus Armbruster
Markus Armbruster writes: > Markus Armbruster writes: > >> Markus Armbruster writes: >> >>> "Daniel P. Berrange" writes: >>> >>>> Currently the QObjectInputVisitor assumes that all scalar >>>> values are directly represen

Re: [Qemu-block] [Qemu-devel] [PATCH v14 11/21] qapi: add integer range support for QObjectInputVisitor

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The traditional CLI arg syntax allows two ways to specify > integer lists, either one value per key, or a range of > values per key. eg the following are identical: > > -arg foo=5,foo=6,foo=7 > -arg foo=5-7 > > This extends the QObjectInputVisitor so that it is

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > If given an option string such as > > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy=bind > > the qemu_opts_to_qdict() method will currently overwrite > the values for repeated option keys, so only the last > value is in the returned dict: > > size=QString("102

Re: [Qemu-block] [Qemu-devel] [PATCH v14 11/21] qapi: add integer range support for QObjectInputVisitor

2016-10-12 Thread Markus Armbruster
Kevin Wolf writes: > Am 12.10.2016 um 17:50 hat Markus Armbruster geschrieben: >> "Daniel P. Berrange" writes: >> >> > The traditional CLI arg syntax allows two ways to specify >> > integer lists, either one value per key, or a range of >>

Re: [Qemu-block] [Qemu-devel] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts

2016-10-13 Thread Markus Armbruster
Markus Armbruster writes: > "Daniel P. Berrange" writes: > >> Instead of requiring all callers to go through the mutli-step > > multi-step > >> process of turning QemuOpts into a suitable QObject for visiting, >> add a new constructor that

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-13 Thread Markus Armbruster
"Daniel P. Berrange" writes: > If given an option string such as > > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy=bind > > the qemu_opts_to_qdict() method will currently overwrite > the values for repeated option keys, so only the last > value is in the returned dict: > > size=QString("102

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-13 Thread Markus Armbruster
Markus Armbruster writes: > "Daniel P. Berrange" writes: > >> If given an option string such as >> >> size=1024,nodes=10,nodes=4-5,nodes=1-2,policy=bind >> >> the qemu_opts_to_qdict() method will currently overwrite >> the values for repea

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-13 Thread Markus Armbruster
Cc: Kevin for discussion of QemuOpts dotted key convention "Daniel P. Berrange" writes: > Currently qdict_crumple requires a totally flat QDict as its > input. i.e. all values in the QDict must be scalar types. > > In order to have backwards compatibility with the OptsVisitor, > qemu_opt_to_qdic

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-17 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.10.2016 um 14:35 hat Markus Armbruster geschrieben: >> Cc: Kevin for discussion of QemuOpts dotted key convention >> >> "Daniel P. Berrange" writes: >> >> > Currently qdict_crumple requires a totally flat QDict as its &g

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-17 Thread Markus Armbruster
Paolo Bonzini writes: >> For me, a replacement should do structured values by providing suitable >> *value* syntax instead of hacking it into the keys: >> >> { "driver": "quorum", >> "child": [ { "driver": "file", "filename": "disk1.img" }, >> { "driver": "host_device"

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-18 Thread Markus Armbruster
Eric Blake writes: > On 10/17/2016 09:50 AM, Markus Armbruster wrote: >>> But even if I realised that QemuOpts support this syntax, I think we >>> would still have to use the dotted syntax because it's explicit about >>> the index and we need that

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The qdict_flatten() method will take a dict whose elements are > further nested dicts/lists and flatten them by concatenating > keys. > > The qdict_crumple() method aims to do the reverse, taking a flat > qdict, and turning it into a set of nested dicts/lists. It wi

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 17.10.2016 um 16:50 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 13.10.2016 um 14:35 hat Markus Armbruster geschrieben: >> >> Cc: Kevin for discussion of QemuOpts dotted key convention >&

Re: [Qemu-block] [Qemu-devel] [PATCH v14 14/21] qapi: allow repeated opts with qobject_input_visitor_new_opts

2016-10-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The qobject_input_visitor_new_opts() method gains a new > parameter to control whether it allows repeated option > keys in the input QemuOpts or not. > > Signed-off-by: Daniel P. Berrange > --- > include/qapi/qobject-input-visitor.h | 6 ++ > qapi/qobject-inpu

Re: [Qemu-block] [Qemu-devel] [PATCH v14 15/21] qom: support non-scalar properties with -object

2016-10-19 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The current -object command line syntax only allows for > creation of objects with scalar properties, or a list > with a fixed scalar element type. Objects which have > properties that are represented as structs in the QAPI > schema cannot be created using -object.

Re: [Qemu-block] [Qemu-devel] [PATCH v14 16/21] hmp: support non-scalar properties with object_add

2016-10-19 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The current object_add HMP syntax only allows for > creation of objects with scalar properties, or a list > with a fixed scalar element type. Objects which have > properties that are represented as structs in the QAPI > schema cannot be created using -object. > > Th

Re: [Qemu-block] [Qemu-devel] [PATCH v14 17/21] numa: convert to use QObjectInputVisitor for -numa

2016-10-19 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Switch away from using OptsVisitor to parse the -numa > argument processing. This enables use of the modern > list syntax for specifying CPUs. e.g. the old syntax > > -numa node,nodeid=0,cpus=0-3,cpus=8-11,mem=107 > > is equivalent to > > -numa node,nodeid=0,cpu

Re: [Qemu-block] [Qemu-devel] [PATCH v14 20/21] net: convert to QObjectInputVisitor for -net/-netdev parsing

2016-10-20 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The -net/-netdev command line parsing code uses OptsVisitor > for parsing options to populate NetLegacy or NetDev struct > respectively. Although those structs have nesting, the > OptsVisitor flattens them, so we must enable compatibility > options to auto-create st

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/19] QAPI/QOM work for non-scalar object properties

2016-10-20 Thread Markus Armbruster
I've warmed quite a bit to this series while reviewing it. In particular, I've come around to like structuring the command line -> QAPI pipeline exactly like the JSON -> QAPI pipeline, namely 1. parse into QObject, 2. convert to QAPI with the QObject input visitor. QObject serves as abstract synta

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/19] QAPI/QOM work for non-scalar object properties

2016-10-21 Thread Markus Armbruster
Uh, replied to the wrong v14... The one I reviewed is actually v15, Message-Id: <1475246744-29302-1-git-send-email-berra...@redhat.com> http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg08238.html Markus Armbruster writes: > I've warmed quite a bit to this series while rev

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > The qdict_flatten() method will take a dict whose elements are >> > further nested dicts/lists and f

Re: [Qemu-block] [Qemu-devel] [PATCH v14 03/21] qapi: add trace events for visitor

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Oct 07, 2016 at 03:59:07PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > Allow tracing of the operation of visitors >> > >> > Signed-off-by: Daniel P. Berrange >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 11/21] qapi: add integer range support for QObjectInputVisitor

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 05:50:41PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > The traditional CLI arg syntax allows two ways to specify >> > integer lists, either one value per key

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 07:46:00PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > If given an option string such as >> > >> > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Oct 13, 2016 at 10:31:37AM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > If given an option string such as >> > >> > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy

Re: [Qemu-block] [Qemu-devel] [PATCH v14 09/21] qapi: permit auto-creating single element lists

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 11:18:21AM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > When converting QemuOpts to a QObject, there is no information >> > about compound types avai

Re: [Qemu-block] [Qemu-devel] [PATCH v14 01/21] option: make parse_option_bool/number non-static

2016-10-21 Thread Markus Armbruster
ewed-by: Kevin Wolf > Reviewed-by: Marc-André Lureau > Reviewed-by: Eric Blake > Reviewed-by: Markus Armbruster > Signed-off-by: Daniel P. Berrange On first glance, this patch makes the boolean values recognized on the command line consistent regardless of which part of the co

Re: [Qemu-block] [Qemu-devel] [PATCH v14 01/21] option: make parse_option_bool/number non-static

2016-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2016 11:55 AM, Markus Armbruster wrote: > >> >> On first glance, this patch makes the boolean values recognized on the >> command line consistent regardless of which part of the code is used to >> recognize them, by extending the

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/21] QAPI/QOM work for non-scalar object properties

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > An update of a series previously posted > > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html > v3: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02498.html

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-24 Thread Markus Armbruster
Max Reitz writes: > On 21.10.2016 11:58, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >>> On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: >>>> "Daniel P. Berrange" writes: >>>> >>>&g

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-24 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Mon, Oct 24, 2016 at 11:18:29AM +0200, Markus Armbruster wrote: >> Max Reitz writes: >> >> > On 21.10.2016 11:58, Markus Armbruster wrote: >> >> "Daniel P. Berrange" writes: >> >> >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-25 Thread Markus Armbruster
Max Reitz writes: > On 21.10.2016 11:58, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >>> On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: >>>> "Daniel P. Berrange" writes: >>>> >>>&g

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Oct 25, 2016 at 12:03:33PM +0200, Markus Armbruster wrote: >> Max Reitz writes: >> >> > On 21.10.2016 11:58, Markus Armbruster wrote: >> >> "Daniel P. Berrange" writes: >> >> >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 04/21] qapi: rename QmpInputVisitor to QObjectInputVisitor

2016-10-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The QmpInputVisitor has no direct dependency on QMP. It is > valid to use it anywhere that one has a QObject. Rename it > to better reflect its functionality as a generic QObject > to QAPI converter. > > Reviewed-by: Kevin Wolf > Reviewed-by: Eric Blake > Signed-o

Re: [Qemu-block] [Qemu-devel] [PATCH v14 05/21] qapi: rename QmpOutputVisitor to QObjectOutputVisitor

2016-10-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The QmpOutputVisitor has no direct dependency on QMP. It is > valid to use it anywhere that one wants a QObject. Rename it > to better reflect its functionality as a generic QAPI > to QObject converter. > > Reviewed-by: Kevin Wolf > Reviewed-by: Eric Blake > Signe

Re: [Qemu-block] [Qemu-devel] [PATCH v5 13/13] iotests: Add test for NBD's blockdev-add interface

2016-10-25 Thread Markus Armbruster
Max Reitz writes: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/147 | 196 > + > tests/qemu-iotests/147.out | 5 ++ > tests/qemu-iotests/group | 1 + > 3 files changed, 202 insertions(+) > create mode 100755 tests/qemu-iotests/147

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/2] qapi: allow blockdev-add for NFS

2016-10-26 Thread Markus Armbruster
A few drive-by comments... Eric Blake writes: > On 10/24/2016 02:27 PM, Ashijeet Acharya wrote: >> Introduce new object 'BlockdevOptionsNFS' in qapi/block-core.json to >> support blockdev-add for NFS network protocol driver. Also make a new >> struct NFSServer to support tcp connection. >> >> S

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/2] qapi: allow blockdev-add for NFS

2016-10-26 Thread Markus Armbruster
Kevin Wolf writes: > Am 26.10.2016 um 09:23 hat Markus Armbruster geschrieben: >> A few drive-by comments... >> >> Eric Blake writes: >> >> > On 10/24/2016 02:27 PM, Ashijeet Acharya wrote: >> >> Introduce new object 'BlockdevOptionsNFS&#

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.8? 0/3] block/curl: Drop TFTP "support"

2016-11-03 Thread Markus Armbruster
Max Reitz writes: > See patch 3 for the reason why we have actually never supported TFTP at > all (except for very small files (i.e. below 256 kB or so)). Care to explain why it works "for very small files" in a bit more detail? PATCH 3 gives a "does not support byte ranges" hint, but to go fro

Re: [Qemu-block] [Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands

2016-11-06 Thread Markus Armbruster
Changlong Xie writes: > Signed-off-by: Changlong Xie > --- > docs/block-replication.txt | 22 +- > 1 file changed, 17 insertions(+), 5 deletions(-) > > diff --git a/docs/block-replication.txt b/docs/block-replication.txt > index 6bde673..6b9c77b 100644 > --- a/docs/block-rep

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.8? 0/3] block/curl: Drop TFTP "support"

2016-11-07 Thread Markus Armbruster
Max Reitz writes: > On 03.11.2016 08:56, Markus Armbruster wrote: >> Max Reitz writes: >> >>> See patch 3 for the reason why we have actually never supported TFTP at >>> all (except for very small files (i.e. below 256 kB or so)). >> >> Care to exp

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.8? 0/3] block/curl: Drop TFTP "support"

2016-11-07 Thread Markus Armbruster
Max Reitz writes: > On 07.11.2016 09:20, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 03.11.2016 08:56, Markus Armbruster wrote: >>>> Max Reitz writes: >>>> >>>>> See patch 3 for the reason why we have actually neve

Re: [Qemu-block] [Qemu-devel] [PATCH v10 07/10] hbitmap: serialization

2016-11-25 Thread Markus Armbruster
John Snow writes: > From: Vladimir Sementsov-Ogievskiy > > Functions to serialize / deserialize(restore) HBitmap. HBitmap should be > saved to linear sequence of bits independently of endianness and bitmap > array element (unsigned long) size. Therefore Little Endian is chosen. > > These functio

[Qemu-block] Meeting notes on -blockdev, dynamic backend reconfiguration

2016-12-05 Thread Markus Armbruster
I recently met Kevin, and we discussed two block layer topics in some depth. = -blockdev = We want a command line option to mirror QMP blockdev-add for 2.9. QemuOpts has to grow from "list of (key, simple value) plus conventions to support lists of simple values in limited ways" to the expressive

Re: [Qemu-block] [Qemu-devel] Meeting notes on -blockdev, dynamic backend reconfiguration

2016-12-08 Thread Markus Armbruster
Fam Zheng writes: > On Wed, 12/07 10:48, Kevin Wolf wrote: >> > If so I think there is no race to worry about, mirror-filter should go >> > away only after a QMP command. >> >> Currently, a mirror job goes away whenever it is done. This is not >> directly tied to a QMP command. > > Ah right, blo

<    1   2   3   4   5   6   7   8   9   10   >