* [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params
@ 2023-11-20 17:18 Philippe Mathieu-Daudé
2023-11-21 7:06 ` Markus Armbruster
2023-11-22 21:02 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-20 17:18 UTC (permalink / raw)
To: qemu-devel
Cc: Markus Armbruster, Hanna Reitz, Kevin Wolf, Stefan Weil,
qemu-block, Stefan Hajnoczi, Fam Zheng, Paolo Bonzini,
Philippe Mathieu-Daudé
aio_context_set_aio_params() doesn't use its undocumented
Error** argument. Remove it to simplify.
Note this removes a use of "unchecked Error**" in
iothread_set_aio_context_params().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/block/aio.h | 3 +--
iothread.c | 3 +--
util/aio-posix.c | 3 +--
util/aio-win32.c | 3 +--
util/main-loop.c | 5 +----
5 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/block/aio.h b/include/block/aio.h
index f08b358077..7c28239d8d 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -716,8 +716,7 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
* @max_batch: maximum number of requests in a batch, 0 means that the
* engine will use its default
*/
-void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch,
- Error **errp);
+void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch);
/**
* aio_context_set_thread_pool_params:
diff --git a/iothread.c b/iothread.c
index b753286414..6c1fc8c856 100644
--- a/iothread.c
+++ b/iothread.c
@@ -170,8 +170,7 @@ static void iothread_set_aio_context_params(EventLoopBase *base, Error **errp)
}
aio_context_set_aio_params(iothread->ctx,
- iothread->parent_obj.aio_max_batch,
- errp);
+ iothread->parent_obj.aio_max_batch);
aio_context_set_thread_pool_params(iothread->ctx, base->thread_pool_min,
base->thread_pool_max, errp);
diff --git a/util/aio-posix.c b/util/aio-posix.c
index 7f2c99729d..266c9dd35f 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -777,8 +777,7 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
aio_notify(ctx);
}
-void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch,
- Error **errp)
+void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch)
{
/*
* No thread synchronization here, it doesn't matter if an incorrect value
diff --git a/util/aio-win32.c b/util/aio-win32.c
index 948ef47a4d..d144f9391f 100644
--- a/util/aio-win32.c
+++ b/util/aio-win32.c
@@ -438,7 +438,6 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
}
}
-void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch,
- Error **errp)
+void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch)
{
}
diff --git a/util/main-loop.c b/util/main-loop.c
index 797b640c41..63b4cda84a 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -192,10 +192,7 @@ static void main_loop_update_params(EventLoopBase *base, Error **errp)
return;
}
- aio_context_set_aio_params(qemu_aio_context, base->aio_max_batch, errp);
- if (*errp) {
- return;
- }
+ aio_context_set_aio_params(qemu_aio_context, base->aio_max_batch);
aio_context_set_thread_pool_params(qemu_aio_context, base->thread_pool_min,
base->thread_pool_max, errp);
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params
2023-11-20 17:18 [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params Philippe Mathieu-Daudé
@ 2023-11-21 7:06 ` Markus Armbruster
2023-11-22 21:02 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2023-11-21 7:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Hanna Reitz, Kevin Wolf, Stefan Weil, qemu-block,
Stefan Hajnoczi, Fam Zheng, Paolo Bonzini
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> aio_context_set_aio_params() doesn't use its undocumented
> Error** argument. Remove it to simplify.
>
> Note this removes a use of "unchecked Error**" in
> iothread_set_aio_context_params().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params
2023-11-20 17:18 [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params Philippe Mathieu-Daudé
2023-11-21 7:06 ` Markus Armbruster
@ 2023-11-22 21:02 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2023-11-22 21:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Markus Armbruster, Hanna Reitz, Kevin Wolf,
Stefan Weil, qemu-block, Fam Zheng, Paolo Bonzini
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
On Mon, Nov 20, 2023 at 06:18:06PM +0100, Philippe Mathieu-Daudé wrote:
> aio_context_set_aio_params() doesn't use its undocumented
> Error** argument. Remove it to simplify.
>
> Note this removes a use of "unchecked Error**" in
> iothread_set_aio_context_params().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/block/aio.h | 3 +--
> iothread.c | 3 +--
> util/aio-posix.c | 3 +--
> util/aio-win32.c | 3 +--
> util/main-loop.c | 5 +----
> 5 files changed, 5 insertions(+), 12 deletions(-)
Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-22 21:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 17:18 [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params Philippe Mathieu-Daudé
2023-11-21 7:06 ` Markus Armbruster
2023-11-22 21:02 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).