From: Anthony PERARD <anthony.perard@vates.tech>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Juergen Gross <jgross@suse.com>,
Jason Andryuk <jason.andryuk@amd.com>
Subject: Re: [PATCH v4] libxl: Enable stubdom cdrom changing
Date: Mon, 29 Jul 2024 14:32:34 +0000 [thread overview]
Message-ID: <ZqeoAElP7fWJc15s@l14> (raw)
In-Reply-To: <20240728210856.310083-1-jandryuk@gmail.com>
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.
And looks like it's the only issue,
with that fixed: Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
> + } else if (fdset < 0) {
> + rc = fdset;
> + goto out;
> + }
> +
> + cis->stubdom_fdset = fdset;
> +
> + LOGD(DEBUG, cis->domid, "Found fdset %d", cis->stubdom_fdset);
> + cdrom_insert_ejected(egc, &cis->qmp, NULL, rc);
> + return;
> +
> + out:
> + cdrom_insert_done(egc, cis, rc); /* must be last */
> +}
> +
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2024-07-29 14:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 21:08 [PATCH v4] libxl: Enable stubdom cdrom changing Jason Andryuk
2024-07-29 14:32 ` Anthony PERARD [this message]
2024-07-29 15:03 ` Jason Andryuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqeoAElP7fWJc15s@l14 \
--to=anthony.perard@vates.tech \
--cc=andrew.cooper3@citrix.com \
--cc=jandryuk@gmail.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.