[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/6] iothread: Remove unused Error** argument in aio_context_set_a
From: |
Stefan Hajnoczi |
Subject: |
[PULL 1/6] iothread: Remove unused Error** argument in aio_context_set_aio_params |
Date: |
Mon, 8 Jan 2024 11:37:30 -0500 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20231120171806.19361-1-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 af05512a7d..c802a392e5 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -699,8 +699,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.43.0
- [PULL 0/6] Block patches, Stefan Hajnoczi, 2024/01/08
- [PULL 1/6] iothread: Remove unused Error** argument in aio_context_set_aio_params,
Stefan Hajnoczi <=
- [PULL 4/6] qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql(), Stefan Hajnoczi, 2024/01/08
- [PULL 5/6] Replace "iothread lock" with "BQL" in comments, Stefan Hajnoczi, 2024/01/08
- [PULL 3/6] qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to BQL_LOCK_GUARD, Stefan Hajnoczi, 2024/01/08
- [PULL 2/6] system/cpus: rename qemu_mutex_lock_iothread() to bql_lock(), Stefan Hajnoczi, 2024/01/08
- [PULL 6/6] Rename "QEMU global mutex" to "BQL" in comments and docs, Stefan Hajnoczi, 2024/01/08
- Re: [PULL 0/6] Block patches, Peter Maydell, 2024/01/09