On 3/25/2026 11:56 AM, Stefan Hajnoczi wrote:
On Mon, Mar 23, 2026 at 08:54:51AM -0500, Jaehoon Kim wrote:
@@ -831,7 +822,8 @@ void aio_context_destroy(AioContext *ctx)
}
void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
- int64_t grow, int64_t shrink, Error **errp)
+ int64_t grow, int64_t shrink,
+ int64_t weight, Error **errp)
{
AioHandler *node;
@@ -848,6 +840,7 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
ctx->poll_max_ns = max_ns;
ctx->poll_grow = grow;
ctx->poll_shrink = shrink;
+ ctx->poll_weight = weight;
ctx->poll_ns = 0;
aio_notify(ctx);
On second thought, now that the divide-by-0 protection has been removed
and these fields are assumed to hold a valid value when poll_max_ns > 0,
aio_context_set_poll_params() needs the same 0-protection as
iothread_set_param().
Thanks for pointing that out. I only considered the user settings and
overlooked the possibility of this being configured in test code or
other areas.
I will add divide-by-zero protection to aio_context_set_poll_params.
and update the versioning to 11.1 in the next version.
Regards,
Jaehoon