From: Stefan Hajnoczi <stefanha@gmail.com>
To: Chrysostomos Nanakos <cnanakos@grnet.gr>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 2/3] block/archipelago: Add support for creating images
Date: Fri, 20 Jun 2014 22:35:34 +0800 [thread overview]
Message-ID: <20140620143534.GH11029@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1403189328-18457-3-git-send-email-cnanakos@grnet.gr>
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
On Thu, Jun 19, 2014 at 05:48:47PM +0300, Chrysostomos Nanakos wrote:
> +static int qemu_archipelago_create_volume(Error **errp, const char *volname,
> + uint64_t size, xport mportno,
> + xport vportno)
> +{
> + int ret, targetlen;
> + struct xseg *xseg = NULL;
> + struct xseg_request *req;
> + struct xseg_request_clone *xclone;
> + struct xseg_port *port;
> + xport srcport = NoPort, sport = NoPort;
> + char *target;
> +
> + /* Try default values if none has been set */
> + if (mportno == (xport) -1) {
> + mportno = 1001;
> + }
> +
> + if (vportno == (xport) -1) {
> + vportno = 501;
> + }
> +
> + if (xseg_initialize()) {
> + error_setg(errp, "Cannot initialize XSEG");
> + return -1;
> + }
> +
> + xseg = xseg_join((char *)"posix", (char *)"archipelago",
> + (char *)"posixfd", NULL);
> +
> + if (!xseg) {
> + error_setg(errp, "Cannot join XSEG shared memory segment");
> + return -1;
> + }
> +
> + port = xseg_bind_dynport(xseg);
> + srcport = port->portno;
> + init_local_signal(xseg, sport, srcport);
> +
> + req = xseg_get_request(xseg, srcport, mportno, X_ALLOC);
> + if (!req) {
> + error_setg(errp, "Cannot get XSEG request");
> + return -1;
xseg_leave() is missing.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-06-20 14:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 14:48 [Qemu-devel] [PATCH v4 0/3] Support Archipelago as a QEMU block backend Chrysostomos Nanakos
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 1/3] block: " Chrysostomos Nanakos
2014-06-20 14:33 ` Stefan Hajnoczi
2014-06-23 8:17 ` Chrysostomos Nanakos
2014-06-23 8:31 ` Stefan Hajnoczi
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 2/3] block/archipelago: Add support for creating images Chrysostomos Nanakos
2014-06-20 14:35 ` Stefan Hajnoczi [this message]
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 3/3] QMP: Add support for Archipelago Chrysostomos Nanakos
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=20140620143534.GH11029@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=cnanakos@grnet.gr \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).