| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4] libxl: Enable stubdom cdrom changing
 On Mon, Jul 29, 2024 at 10:32 AM Anthony PERARD
<anthony.perard@xxxxxxxxxx> wrote:
>
> On Sun, Jul 28, 2024 at 05:08:56PM -0400, Jason Andryuk wrote:
> > +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc,
> > +                                             libxl__ev_qmp *qmp,
> > +                                             const libxl__json_object 
> > *response,
> > +                                             int rc)
> > +{
> > +    EGC_GC;
> > +    libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp);
> > +    int devid;
> > +    int fdset;
> > +
> > +    if (rc) goto out;
> > +
> > +    /* Only called for qemu-xen/linux stubdom. */
> > +    assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN);
> > +
> > +    devid = libxl__device_disk_dev_number(cis->disk->vdev, NULL, NULL);
> > +    fdset = query_fdsets_find_fdset(gc, response, devid);
> > +    if (fdset == ERROR_NOTFOUND) {
> > +        /* Give the stubdom a little time before trying again. */
> > +        rc = libxl__ev_time_register_rel(cis->ao, &cis->retry_timer,
> > +                                         cdrom_insert_stubdom_query_fdset,
> > +                                         200);
> > +        if (rc) goto out;
>
> There's a missing "return;" here.
Thank you for spotting that!  Now I feel silly that I missed it.  My
quick testing yesterday succeeded, but it must not have needed a
retry.  So I did not notice.  I have re-tested with your change and
verified that retries happen properly - I see two 'query-fdsets' QMP
commands sometimes.
> And looks like it's the only issue,
> with that fixed: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Thanks,
Jason
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |