On Mon, Mar 9, 2026 at 4:44 PM Stefan Hajnoczi <[email protected]> wrote:
>
> On Thu, Mar 05, 2026 at 10:24:53PM +0800, Zhang Chen wrote:
> > @@ -1434,11 +1436,17 @@ static void colo_compare_finalize(Object *obj)
> >
> >      qemu_bh_delete(s->event_bh);
> >
> > -    AioContext *ctx = iothread_get_aio_context(s->iothread);
> > +    /*
> > +     * Use the device's canonical path as the holder ID to track IOThread
> > +     * usage and ensure the AioContext remains valid during the device's
> > +     * lifecycle.
> > +     */
> > +    AioContext *ctx = iothread_get_aio_context(s->iothread, NULL);
>
> Should NULL be path?
>

Yes, here code in the finalize function need to waiting for the
coroutine to complete processing
Or do you have any other suggestion?

Thanks
Chen

> >      AIO_WAIT_WHILE(ctx, !s->out_sendco.done);
> >      if (s->notify_dev) {
> >          AIO_WAIT_WHILE(ctx, !s->notify_sendco.done);
> >      }
> > +    iothread_put_aio_context(s->iothread, path);

Reply via email to