Re: [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working

2024-02-07 Thread Manos Pitsidianakis
been sent in a separate patch, here it is just for > completness) > qemu-img: refresh options/--help for "check" command > qemu-img: simplify --repair error message > qemu-img: refresh options/--help for "commit" command > qemu-img: refresh options/--help for

Re: [PATCH 1/5] virtio-blk: enforce iothread-vq-mapping validation

2024-02-05 Thread Manos Pitsidianakis
s->host_features); virtio_init(vdev, VIRTIO_ID_BLOCK, s->config_size); -- 2.43.0 virtio_block_ops and methods are moved around without changes in the diff, is that on purpose? If no the patch and history would be less noisy. Regardless: Reviewed-by: Manos Pitsidianakis

Re: [PATCH 5/5] monitor: use aio_co_reschedule_self()

2024-02-05 Thread Manos Pitsidianakis
(); +aio_co_reschedule_self(iohandler_get_aio_context()); } } else { /* -- 2.43.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH 2/5] virtio-blk: clarify that there is at least 1 virtqueue

2024-02-05 Thread Manos Pitsidianakis
ring ->realize() */ r = blk_set_aio_context(s->conf.conf.blk, s->vq_aio_context[0], _err); if (r < 0) { -- 2.43.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH 3/5] virtio-blk: add vq_rq[] bounds check in virtio_blk_dma_restart_cb()

2024-02-05 Thread Manos Pitsidianakis
static void virtio_blk_dma_restart_cb(void *opaque, bool running, VirtIOBlockReq *next = rq->next; uint16_t idx = virtio_get_queue_index(rq->vq); +assert(idx < num_queues); rq->next = vq_rq[idx]; vq_rq[idx] = rq; rq = next; -- 2.43

Re: [PATCH 4/5] virtio-blk: declare VirtIOBlock::rq with a type

2024-02-05 Thread Manos Pitsidianakis
struct VirtIOBlockReq *rq; /* protected by rq_lock */ VirtIOBlkConf conf; unsigned short sector_mask; bool original_wce; -- 2.43.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH] hw/hyperv: Include missing headers

2024-01-30 Thread Manos Pitsidianakis
uot; @@ -21,6 +22,9 @@ #include "qemu/rcu_queue.h" #include "hw/hyperv/hyperv.h" #include "qom/object.h" +#include "target/i386/kvm/hyperv-proto.h" +#include "target/i386/cpu.h" +#include "exec/cpu-all.h" struct SynICState { DeviceState parent_obj; -- 2.41.0 Reviewed-by: Manos Pitsidianakis

[PATCH v3 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-29 Thread Manos Pitsidianakis
Add a simple method to return some kind of human readable identifier for use in error messages. Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis --- include/hw/qdev-core.h | 14 ++ hw/core/qdev.c | 8 2 files changed, 22 insertions(+) diff --git

[PATCH v3 0/2] hw/block/block.c: improve confusing error

2024-01-29 Thread Manos Pitsidianakis
et_human_name (thanks Phil Mathieu-Daudé ) Manos Pitsidianakis (2): hw/core/qdev.c: add qdev_get_human_name() hw/block/block.c: improve confusing blk_check_size_and_read_all() error include/hw/block/block.h | 4 ++-- include/hw/qdev-core.h | 14 ++

[PATCH v3 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-29 Thread Manos Pitsidianakis
ppropriate. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Manos Pitsidianakis --- include/hw/block/block.h | 4 ++-- hw/block/block.c | 25 +++-- hw/block/m25p80.c| 3 ++- hw/block/pflash_cfi01.c | 4 ++-- hw/block/pflash_cfi02.c | 2 +- 5 files c

[PATCH v3 2/6] hw/arm/z2: convert DPRINTF to trace events and guest errors

2024-01-29 Thread Manos Pitsidianakis
that report guest errors are logged with LOG_GUEST_ERROR. Signed-off-by: Manos Pitsidianakis --- hw/arm/trace-events | 7 +++ hw/arm/z2.c | 27 --- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/hw/arm/trace-events b/hw/arm/trace-events index

[PATCH v3 6/6] hw/xen: convert stderr prints to error/warn reports

2024-01-29 Thread Manos Pitsidianakis
ormat. > Use error_printf() & friends to print additional information. This commit changes fprintfs that report warnings and errors to the appropriate report functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Manos Pitsidianakis --- hw/xen/xen-hvm-common.c | 12 ++-- hw/xen/xe

[PATCH v3 4/6] hw/xen/xen-mapcache.c: convert DPRINTF to tracepoints

2024-01-29 Thread Manos Pitsidianakis
-by: Manos Pitsidianakis --- hw/xen/trace-events | 11 + hw/xen/xen-mapcache.c | 54 +++ 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/hw/xen/trace-events b/hw/xen/trace-events index 67a6c41926..a65dc0e55f 100644 --- a/hw/xen

[PATCH v3 3/6] hw/arm/xen_arm.c: convert DPRINTF to trace events and error/warn reports

2024-01-29 Thread Manos Pitsidianakis
or warnings are converted to error_report and warn_report calls. Signed-off-by: Manos Pitsidianakis --- hw/arm/trace-events | 5 + hw/arm/xen_arm.c| 23 +++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/hw/arm/trace-events b/hw/arm/trace-events index

[PATCH v3 5/6] hw/xen/xen-hvm-common.c: convert DPRINTF to tracepoints

2024-01-29 Thread Manos Pitsidianakis
-by: Manos Pitsidianakis --- hw/xen/trace-events | 10 +- hw/xen/xen-hvm-common.c | 35 ++- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/hw/xen/trace-events b/hw/xen/trace-events index a65dc0e55f..d1b27f6c11 100644 --- a/hw/xen/trace

[PATCH v3 1/6] hw/arm/strongarm.c: convert DPRINTF to trace events and guest errors

2024-01-29 Thread Manos Pitsidianakis
that report guest errors are logged with LOG_GUEST_ERROR.# Signed-off-by: Manos Pitsidianakis --- hw/arm/strongarm.c | 82 - hw/arm/trace-events | 3 ++ 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/hw/arm/strongarm.c b/hw/arm

[PATCH v3 0/6] hw/{arm,xen} convert printfs to trace/reports

2024-01-29 Thread Manos Pitsidianakis
This series changes some printfs to use the trace event framework. Additionally, it converts some error/warning reporting fprintfs to error_report/warn_report. v2 -> v3 : - addressed Peter Maydells's review v1 -> v2 : - addressed Alex's review Manos Pitsidianakis (6):

[PATCH v2 0/2] hw/block/block.c: improve confusing error

2024-01-23 Thread Manos Pitsidianakis
ckend name, the device id and device type name where appropriate. Version 2: - Assert dev is not NULL on qdev_get_human_name (thanks Phil Mathieu-Daudé ) Manos Pitsidianakis (2): hw/core/qdev.c: add qdev_get_human_name() hw/block/block.c: improve confusing blk_check_size_and_read_all() error

[PATCH v2 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-23 Thread Manos Pitsidianakis
ppropriate. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Manos Pitsidianakis --- hw/block/block.c | 25 +++-- hw/block/m25p80.c| 3 ++- hw/block/pflash_cfi01.c | 4 ++-- hw/block/pflash_cfi02.c | 2 +- include/hw/block/block.h | 4 ++-- 5 files c

[PATCH v2 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-23 Thread Manos Pitsidianakis
Add a simple method to return some kind of human readable identifier for use in error messages. Signed-off-by: Manos Pitsidianakis --- hw/core/qdev.c | 8 include/hw/qdev-core.h | 14 ++ 2 files changed, 22 insertions(+) diff --git a/hw/core/qdev.c b/hw/core

Re: [PATCH 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-23 Thread Manos Pitsidianakis
On Tue, 23 Jan 2024 10:13, Philippe Mathieu-Daudé wrote: Hi Manos, On 23/1/24 09:09, Manos Pitsidianakis wrote: Add a simple method to return some kind of human readable identifier for use in error messages. Signed-off-by: Manos Pitsidianakis --- hw/core/qdev.c | 10

[PATCH 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-23 Thread Manos Pitsidianakis
ppropriate. Signed-off-by: Manos Pitsidianakis --- hw/block/block.c | 25 +++-- hw/block/m25p80.c| 3 ++- hw/block/pflash_cfi01.c | 4 ++-- hw/block/pflash_cfi02.c | 2 +- include/hw/block/block.h | 4 ++-- 5 files changed, 22 insertions(+), 16 deletion

[PATCH 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-23 Thread Manos Pitsidianakis
Add a simple method to return some kind of human readable identifier for use in error messages. Signed-off-by: Manos Pitsidianakis --- hw/core/qdev.c | 10 ++ include/hw/qdev-core.h | 15 +++ 2 files changed, 25 insertions(+) diff --git a/hw/core/qdev.c b/hw/core

[PATCH 0/2] hw/block/block.c: improve confusing error

2024-01-23 Thread Manos Pitsidianakis
ckend name, the device id and device type name where appropriate. Manos Pitsidianakis (2): hw/core/qdev.c: add qdev_get_human_name() hw/block/block.c: improve confusing blk_check_size_and_read_all() error hw/block/block.c | 25 +++-- hw/block/m25p80.c| 3 ++-

Re: [PATCH v5 5/6] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-10-20 Thread Manos Pitsidianakis
On Fri, 20 Oct 2023 12:02, "Michael S. Tsirkin" wrote: On Fri, Oct 20, 2023 at 09:16:03AM +0100, Alex Bennée wrote: Viresh Kumar writes: > On 19-10-23, 10:56, Alex Bennée wrote: >> From: Manos Pitsidianakis >> >> Tested with rust-vmm vhost-user-sound da

Re: [PATCH v8 3/5] vhost-user-scsi: support reconnect to backend

2023-10-18 Thread Manos Pitsidianakis
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. This patch also improves the error messages, and reports some silent errors. Tested with spdk backend. Signed-off-by: Li Feng --- Reviewed-by: Manos Pitsidianakis

Re: [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion

2023-10-17 Thread Manos Pitsidianakis
rty must be set", VIRTIO_PMEM_MEMDEV_PROP); -return NULL; -} +assert(pmem->memdev); return >memdev->mr; } -- 2.41.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-17 Thread Manos Pitsidianakis
obj; +VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); SCSIDevice *d; int rc; -- 2.41.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro

2023-10-17 Thread Manos Pitsidianakis
obj, g->ctrl_vq); +vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq); } static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq) -- 2.41.0 Reviewed-by: Manos Pitsidianakis

Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros

2023-10-17 Thread Manos Pitsidianakis
_t *)>blkcfg, - s->parent_obj.config_len, errp); + VIRTIO_DEVICE(s)->config_len, errp); if (ret < 0) { qemu_chr_fe_disconnect(>chardev); vhost_dev_cleanup(>dev); -- 2.41.0 Reviewed-by: Manos Pitsidianakis

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Manos Pitsidianakis
On Mon, 16 Oct 2023, 18:04 Peter Maydell, wrote: > On Mon, 16 Oct 2023 at 15:58, Manos Pitsidianakis > wrote: > > > > Hello Peter, > > > > On Mon, 16 Oct 2023, 17:13 Peter Maydell, > wrote: > >> > >> On Fri, 13 Oct 2023 at 13:42,

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Manos Pitsidianakis
Hello Peter, On Mon, 16 Oct 2023, 17:13 Peter Maydell, wrote: > On Fri, 13 Oct 2023 at 13:42, Markus Armbruster wrote: > > > > Emmanouil Pitsidianakis writes: > > > > > Hello, > > > > > > This RFC is inspired by the kernel's move to -Wimplicit-fallthrough=3 > > > back in 2019.[0] > > > We

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-13 Thread Manos Pitsidianakis
On Fri, 13 Oct 2023 11:14, "Daniel P. Berrangé" wrote: On Fri, Oct 13, 2023 at 10:47:04AM +0300, Emmanouil Pitsidianakis wrote: Main questions this RFC poses = - Is this change desirable and net-positive. Yes, IMHO it is worth standardizing on use of the

Re: [RFC PATCH 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough

2023-10-13 Thread Manos Pitsidianakis
Hello Markus, On Fri, 13 Oct 2023 15:28, Markus Armbruster wrote: The commit message needs to explain why. Certainly. This is wrong. docs/devel/style.rst: Include directives -- Order include directives as follows: .. code-block:: c #include

Re: [RFC PATCH 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough

2023-10-13 Thread Manos Pitsidianakis
On Fri, 13 Oct 2023 at 11:16, Daniel P. Berrangé wrote: > This patch (and all the others in the series) have a ridiculously > large context either side of the change. It makes this horrible > to review as it requires wading through pages of pre-existing code > trying to spot the change. > >

Re: [PATCH 03/10] tests/virtio-scsi: Clean up global variable shadowing

2023-10-13 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 13:02, Philippe Mathieu-Daudé wrote: Rename the (unused) 'allow' argument, following the pattern s/allow/alloc Otherwise, Reviewed-By: Emmanouil Pitsidianakis used by the other tests in this file. This fixes: tests/qtest/virtio-scsi-test.c:159:61: error: declaration

Re: [PATCH v4 6/6] docs/system: add a basic enumeration of vhost-user devices

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst index a80e95a48a..0f9eec3f00 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -15,6 +15,47 @@ to the guest. The code is

Re: [PATCH v4 2/6] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 51c3f97c2d..d0b963199c 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -18,8 +18,15 @@ if have_vhost # fixme - this really should be generic

Re: [PATCH v7 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Manos Pitsidianakis
Hello Li, I have some trivial style comments you could possibly address in a next version: On Sun, 08 Oct 2023 12:12, Li Feng wrote: diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index df6b66cc1a..5df24faff4 100644 --- a/hw/scsi/vhost-user-scsi.c +++

Re: [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete

2017-11-07 Thread Manos Pitsidianakis
On Fri, Nov 03, 2017 at 02:26:33PM +, Stefan Hajnoczi wrote: On Wed, Oct 25, 2017 at 10:40:47AM +0200, Alberto Garcia wrote: On Tue 24 Oct 2017 05:33:51 AM CEST, sochin jiang wrote: > --- a/block/throttle-groups.c > +++ b/block/throttle-groups.c > @@ -576,7 +576,9 @@ void

Re: [Qemu-block] [PATCH v13 2/6] qmp: Use ThrottleLimits structure

2017-11-06 Thread Manos Pitsidianakis
On Fri, Oct 13, 2017 at 09:26:17AM -0500, Eric Blake wrote: [adding Markus, and block list] On 10/13/2017 09:16 AM, Alberto Garcia wrote: On Mon 02 Oct 2017 04:33:28 PM CEST, Pradeep Jagadeesh wrote: This patch factors out code to use the ThrottleLimits structure. { 'struct':

Re: [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-06 Thread Manos Pitsidianakis
On Fri, Oct 06, 2017 at 02:59:55PM +0200, Max Reitz wrote: On 2017-10-04 23:04, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 08:09:24PM +0200, Max Reitz wrote: On 2017-10-04 19:05, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45

Re: [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Wed, Oct 04, 2017 at 08:09:24PM +0200, Max Reitz wrote: On 2017-10-04 19:05, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45, Manos Pitsidianakis wrote: block-insert-node and its pair command block-remove-node provide runtime

Re: [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45, Manos Pitsidianakis wrote: block-insert-node and its pair command block-remove-node provide runtime insertion and removal of filter nodes. block-insert-node takes a (parent, child) and (node, child) pair of edges

Re: [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Fri, Sep 29, 2017 at 07:52:35PM +0200, Kevin Wolf wrote: Am 15.08.2017 um 09:45 hat Manos Pitsidianakis geschrieben: block-insert-node and its pair command block-remove-node provide runtime insertion and removal of filter nodes. block-insert-node takes a (parent, child) and (node, child

Re: [Qemu-block] [PATCH v3 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-26 Thread Manos Pitsidianakis
On Tue, Sep 26, 2017 at 12:00:24PM +0100, Stefan Hajnoczi wrote: On Sat, Sep 23, 2017 at 02:14:08PM +0300, Manos Pitsidianakis wrote: This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new bdrv_co_drain_end callback to match bdrv_drained_begin/end and drained_begin/end

[Qemu-block] [PATCH v3 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-23 Thread Manos Pitsidianakis
oc comment based on mailing discussion v2: add doc for callbacks and change order of request polling for completion [Stefan] Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback block: rename bdrv_co_drain to bdrv_co_drain_begin block/throttle.c: add bdrv_co_drain_begin/end cal

[Qemu-block] [PATCH v3 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.

[Qemu-block] [PATCH v3 1/3] block: add bdrv_co_drain_end callback

2017-09-23 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_co_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

[Qemu-block] [PATCH v3 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 4 ++-- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files cha

Re: [Qemu-block] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-21 Thread Manos Pitsidianakis
On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: On Thu, 09/21 16:17, Manos Pitsidianakis wrote: BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end s/bdrv_do_drain/bdrv_co_drain/ of the drain. The throttle driver (block/throttle.c) needs a way to mark

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-21 Thread Manos Pitsidianakis
On Thu, Sep 21, 2017 at 09:35:35PM +0800, Fam Zheng wrote: On Thu, 09/21 16:17, Manos Pitsidianakis wrote: This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new bdrv_co_drain_end callback to match bdrv_drained_begin/end and drained_begin/end of BdrvChild. This is needed

[Qemu-block] [PATCH v2 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-21 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 2 +- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/i

[Qemu-block] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-21 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

[Qemu-block] [PATCH v2 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-21 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 5bca76300f..833175ac77 100644 --- a/bloc

[Qemu-block] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-21 Thread Manos Pitsidianakis
g for completion [Stefan] Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback block: rename bdrv_co_drain to bdrv_co_drain_begin block/throttle.c: add bdrv_co_drain_begin/end callbacks include/block/block_int.h | 8 +++- block/io.c

Re: [Qemu-block] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 03:26:32PM +0100, Stefan Hajnoczi wrote: On Wed, Sep 20, 2017 at 01:23:09PM +0300, Manos Pitsidianakis wrote: @@ -188,7 +194,7 @@ static bool bdrv_drain_recurse(BlockDriverState *bs) waited = BDRV_POLL_WHILE(bs, atomic_read(>in_flight) > 0); /* Ensu

Re: [Qemu-block] [PATCH 1/2] block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 02:24:21PM +0200, Kevin Wolf wrote: Am 20.09.2017 um 13:43 hat Manos Pitsidianakis geschrieben: blk_check_byte_request() is called from the blk_co_pwritev/blk_co_preadv to check if the request offset and request bytes parameters are valid for the given Blockbackend

[Qemu-block] [PATCH 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-20 Thread Manos Pitsidianakis
Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 2 +- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h

Re: [Qemu-block] [PATCH v2] throttle-groups: update tg->any_timer_armed[] on detach

2017-09-20 Thread Manos Pitsidianakis
ast since QEMU 2.10.0 with -drive iops=100: $ dd if=/dev/zero of=/dev/vdb oflag=direct count=1000 (qemu) stop (qemu) cont ...I/O is stuck... Reported-by: Yongxue Hong <yh...@redhat.com> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Manos Pitsidianakis <el

[Qemu-block] [PATCH 1/2] block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite

2017-09-20 Thread Manos Pitsidianakis
blk_check_byte_request() is called from the blk_co_pwritev/blk_co_preadv to check if the request offset and request bytes parameters are valid for the given Blockbackend. Let's do that in blk_pread/blk_pwrite too. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block

[Qemu-block] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

[Qemu-block] [PATCH 0/2] remove blk_pread_unthrottled()

2017-09-20 Thread Manos Pitsidianakis
Cleanups for minor stuff I noticed while looking around blk_root_drained_* Manos Pitsidianakis (2): block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite block/block-backend.c: remove blk_pread_unthrottled() include/sysemu/block-backend.h | 2 -- block/block

[Qemu-block] [PATCH 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-20 Thread Manos Pitsidianakis
Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 5bca76300f..833175ac77 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -197,6 +197,21 @@

Re: [Qemu-block] [PATCH v2] throttle-groups: update tg->any_timer_armed[] on detach

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 01:08:52PM +0200, Alberto Garcia wrote: On Wed 20 Sep 2017 12:17:40 PM CEST, Stefan Hajnoczi wrote: @@ -592,6 +592,17 @@ void throttle_group_attach_aio_context(ThrottleGroupMember *tgm, void throttle_group_detach_aio_context(ThrottleGroupMember *tgm) {

[Qemu-block] [PATCH 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-20 Thread Manos Pitsidianakis
io_limits_disabled correctly. Based-on: <20170918202529.28379-1-el13...@mail.ntua.gr> "block/throttle-groups.c: allocate RestartData on the heap" Which fixes a coroutine crash in block/throttle-groups.c Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback

[Qemu-block] [PATCH 2/2] block/block-backend.c: remove blk_pread_unthrottled()

2017-09-20 Thread Manos Pitsidianakis
blk_pread_unthrottled was used to bypass I/O throttling on the BlockBackend in the case of async I/O. This is not needed anymore and we can just call blk_pread() directly. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/sysemu/block-backend.h | 2 -- block/block-bac

[Qemu-block] [PATCH] block/throttle-groups.c: allocate RestartData on the heap

2017-09-18 Thread Manos Pitsidianakis
RestartData is the opaque data of the throttle_group_restart_queue_entry coroutine. By being stack allocated, it isn't available anymore if aio_co_enter schedules the coroutine with a bottom halve and runs after throttle_group_restart_queue returns. Signed-off-by: Manos Pitsidianakis <e

Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-09-08 Thread Manos Pitsidianakis
On Fri, Sep 08, 2017 at 06:00:11PM +0200, Kevin Wolf wrote: Am 08.09.2017 um 17:44 hat Manos Pitsidianakis geschrieben: On Thu, Sep 07, 2017 at 03:26:11PM +0200, Kevin Wolf wrote: > We shouldn't really need any throttling code in > blk_root_drained_begin/end any more now because the th

Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-09-08 Thread Manos Pitsidianakis
On Thu, Sep 07, 2017 at 03:26:11PM +0200, Kevin Wolf wrote: We shouldn't really need any throttling code in blk_root_drained_begin/end any more now because the throttle node will be drained. If this code is necessary, a bdrv_drain() on an explicit throttle node will work differently from one on

Re: [Qemu-block] [Qemu-devel] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-06 Thread Manos Pitsidianakis
On Tue, Sep 05, 2017 at 04:13:39PM -0500, Eric Blake wrote: On 09/05/2017 02:06 PM, Kevin Wolf wrote: Am 05.09.2017 um 18:16 hat Kevin Wolf geschrieben: Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by:

[Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-08-25 Thread Manos Pitsidianakis
of the device. The legacy throttle node is managed by the legacy interface completely. More advanced configurations with the filter drive are possible using the QMP API, but these will be ignored by the legacy interface. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include

[Qemu-block] [PATCH v3 5/7] block/throttle-groups.c: remove throttle-groups list

2017-08-25 Thread Manos Pitsidianakis
. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/throttle-groups.h | 1 + block/block-backend.c | 15 +++-- block/throttle-groups.c | 145 +++- tests/test-throttle.c | 3 + 4 files chang

[Qemu-block] [PATCH v3 6/7] block: remove BlockBackendPublic

2017-08-25 Thread Manos Pitsidianakis
ed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/sysemu/block-backend.h | 12 +--- block/block-backend.c | 43 +++--- block/qapi.c | 4 ++-- blockdev.c | 4 ++-- 4 files changed, 2

[Qemu-block] [PATCH v3 3/7] block: require job-id when device is a node name

2017-08-25 Thread Manos Pitsidianakis
"sync": "full", "target": "backup.img" } } is not a BlockBackend name, instead of automatically getting it from the root BS if device is a node name. That information is lost after calling block_job_create(), so we can do it in its cal

[Qemu-block] [PATCH v3 2/7] block: add options parameter to bdrv_new_open_driver()

2017-08-25 Thread Manos Pitsidianakis
Allow passing a QDict *options parameter to bdrv_new_open_driver() so that it can be used if a driver needs it upon creation. The previous behaviour (empty bs->options and bs->explicit_options) remains when options is NULL. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-o

[Qemu-block] [PATCH v3 7/7] qemu-iotests: add 191 for legacy throttling interface

2017-08-25 Thread Manos Pitsidianakis
Check that the implicit throttle filter driver node, used for compatibility with the legacy throttling interface on the BlockBackend level, works. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- tests/qemu-iotests/1

[Qemu-block] [PATCH v3 1/7] block: skip implicit nodes in snapshots, blockjobs

2017-08-25 Thread Manos Pitsidianakis
graph. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 17 + block.c | 10 ++ block/qapi.c | 14 +- blockdev.c| 34 ++ 4 files

[Qemu-block] [PATCH v3 0/6] block: remove legacy I/O throttling

2017-08-25 Thread Manos Pitsidianakis
ctions add new function to get filter child bs take ownership of options in bdrv_new_open_driver() Manos Pitsidianakis (7): block: skip implicit nodes in snapshots, blockjobs block: add options parameter to bdrv_new_open_driver() block: require job-id when device is a node name block:

[Qemu-block] [PATCH v9 5/6] block: add throttle block filter driver

2017-08-25 Thread Manos Pitsidianakis
-group=bar which registers the throttle filter node with the ThrottleGroup 'bar'. The given group must be created beforehand with object-add or -object. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- qapi/block-core.json

[Qemu-block] [PATCH v9 1/6] block: move ThrottleGroup membership to ThrottleGroupMember

2017-08-25 Thread Manos Pitsidianakis
. This is done by gathering ThrottleGroup membership details from BlockBackendPublic into ThrottleGroupMember and refactoring existing code to use the structure. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidi

[Qemu-block] [PATCH v9 4/6] block: convert ThrottleGroup to object with QOM

2017-08-25 Thread Manos Pitsidianakis
o", "props" : { "limits": { "iops-total": 100 } } } } { "execute" : "qom-set", "arguments" : { "path" : "foo", "property" : "limits", "value"

[Qemu-block] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-25 Thread Manos Pitsidianakis
Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- tests/qemu-iotests/184 | 205 +++ tests/qemu-iotests/184.out | 300 + tests/qemu-iotests/group

[Qemu-block] [PATCH v9 0/6] add throttle block driver filter

2017-08-25 Thread Manos Pitsidianakis
error in 'add aio_context field in ThrottleGroupMember' v2: change QOM throttle group object name print valid ranges for uint on error move frees in throttle_group_obj_finalize() split throttle_group_{set,get}() add throttle_recurse_is_first_non_filter() Manos Pitsidianakis (6): block

[Qemu-block] [PATCH v9 2/6] block: add aio_context field in ThrottleGroupMember

2017-08-25 Thread Manos Pitsidianakis
com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/throttle-groups.h | 7 - block/block-backend.c | 15 -- block/throttle-groups.c | 38 - tes

[Qemu-block] [PATCH v9 3/6] block: tidy ThrottleGroupMember initializations

2017-08-25 Thread Manos Pitsidianakis
Move the CoMutex and CoQueue inits inside throttle_group_register_tgm() which is called whenever a ThrottleGroupMember is initialized. There's no need for them to be separate. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-o

Re: [Qemu-block] [Qemu-devel] [PATCH v7 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-24 Thread Manos Pitsidianakis
On Thu, Aug 24, 2017 at 07:43:08PM +0100, Stefan Hajnoczi wrote: On Tue, Aug 22, 2017 at 01:15:35PM +0300, Manos Pitsidianakis wrote: +_supported_fmt qcow2 What makes this test qcow2-specific? With additional filtering for IMGFMT it should be possible to run this on any image format. I

[Qemu-block] [PATCH v8 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-24 Thread Manos Pitsidianakis
Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- tests/qemu-iotests/184 | 205 +++ tests/qemu-iotests/184.out | 300 + tests/qemu-iotests/group

[Qemu-block] [PATCH v8 2/6] block: add aio_context field in ThrottleGroupMember

2017-08-24 Thread Manos Pitsidianakis
com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/throttle-groups.h | 7 - block/block-backend.c | 15 -- block/throttle-groups.c | 38 - tes

[Qemu-block] [PATCH v8 0/6] add throttle block driver filter

2017-08-24 Thread Manos Pitsidianakis
print valid ranges for uint on error move frees in throttle_group_obj_finalize() split throttle_group_{set,get}() add throttle_recurse_is_first_non_filter() Manos Pitsidianakis (6): block: move ThrottleGroup membership to ThrottleGroupMember block: add aio_context field

[Qemu-block] [PATCH v8 4/6] block: convert ThrottleGroup to object with QOM

2017-08-24 Thread Manos Pitsidianakis
o", "props" : { "limits": { "iops-total": 100 } } } } { "execute" : "qom-set", "arguments" : { "path" : "foo", "property" : "limits", "value"

[Qemu-block] [PATCH v8 5/6] block: add throttle block filter driver

2017-08-24 Thread Manos Pitsidianakis
-group=bar which registers the throttle filter node with the ThrottleGroup 'bar'. The given group must be created beforehand with object-add or -object. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- qapi/block-core.json| 18 ++- include/block/throttle-groups.h

[Qemu-block] [PATCH v8 3/6] block: tidy ThrottleGroupMember initializations

2017-08-24 Thread Manos Pitsidianakis
Move the CoMutex and CoQueue inits inside throttle_group_register_tgm() which is called whenever a ThrottleGroupMember is initialized. There's no need for them to be separate. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-o

[Qemu-block] [PATCH v8 1/6] block: move ThrottleGroup membership to ThrottleGroupMember

2017-08-24 Thread Manos Pitsidianakis
. This is done by gathering ThrottleGroup membership details from BlockBackendPublic into ThrottleGroupMember and refactoring existing code to use the structure. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidi

Re: [Qemu-block] [PATCH v7 5/6] block: add throttle block filter driver

2017-08-22 Thread Manos Pitsidianakis
On Tue, Aug 22, 2017 at 04:16:26PM +0200, Alberto Garcia wrote: On Tue 22 Aug 2017 12:15:34 PM CEST, Manos Pitsidianakis wrote: @@ -548,6 +548,11 @@ void throttle_group_unregister_tgm(ThrottleGroupMember *tgm) ThrottleGroupMember *token; int i; +if (!ts) { +/* Discard

Re: [Qemu-block] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-22 Thread Manos Pitsidianakis
On Tue, Aug 22, 2017 at 03:25:41PM +0200, Alberto Garcia wrote: +/* This function edits throttle_groups and must be called under the global + * mutex */ +static void throttle_group_obj_complete(UserCreatable *obj, Error **errp) +{ +ThrottleGroup *tg = THROTTLE_GROUP(obj); +ThrottleConfig

Re: [Qemu-block] [PATCH v2 3/6] block: require job-id when device is a node name

2017-08-22 Thread Manos Pitsidianakis
On Tue, Aug 22, 2017 at 11:57:28AM +0200, Alberto Garcia wrote: On Mon 21 Aug 2017 05:39:48 PM CEST, Manos Pitsidianakis wrote: -if (job_id == NULL && !(flags & BLOCK_JOB_INTERNAL)) { -job_id = bdrv_get_device_name(bs); -if (!*job_id) { -err

[Qemu-block] [PATCH v7 5/6] block: add throttle block filter driver

2017-08-22 Thread Manos Pitsidianakis
-group=bar which registers the throttle filter node with the ThrottleGroup 'bar'. The given group must be created beforehand with object-add or -object. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- qapi/block-core.json| 18 ++- include/block/throttle-groups.h

[Qemu-block] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-22 Thread Manos Pitsidianakis
o", "props" : { "limits": { "iops-total": 100 } } } } { "execute" : "qom-set", "arguments" : { "path" : "foo", "property" : "limits", "value"

[Qemu-block] [PATCH v7 3/6] block: tidy ThrottleGroupMember initializations

2017-08-22 Thread Manos Pitsidianakis
Move the CoMutex and CoQueue inits inside throttle_group_register_tgm() which is called whenever a ThrottleGroupMember is initialized. There's no need for them to be separate. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-o

  1   2   3   >