From: Stefan Hajnoczi <stefanha@gmail.com>
To: Liu Yuan <namei.unix@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>,
sheepdog@lists.wpkg.org, qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] sheepdog: fix loadvm operation
Date: Wed, 24 Apr 2013 16:53:50 +0200 [thread overview]
Message-ID: <20130424145350.GG24635@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1366796802-6205-1-git-send-email-namei.unix@gmail.com>
On Wed, Apr 24, 2013 at 05:46:41PM +0800, Liu Yuan wrote:
> +/* Delete current working VDI by the name */
> +static int sd_delete(BDRVSheepdogState *s, char *name)
> +{
> + unsigned int wlen = SD_MAX_VDI_LEN;
> + SheepdogVdiReq hdr = {
> + .opcode = SD_OP_DEL_VDI,
> + .vdi_id = s->inode.vdi_id,
> + .data_length = wlen,
> + .flags = SD_FLAG_CMD_WRITE,
> + };
> + SheepdogVdiRsp *rsp = (SheepdogVdiRsp *)&hdr;
> + int fd, ret;
> +
> + fd = connect_to_sdog(s);
> + if (fd < 0) {
> + return fd;
> + }
> +
> + ret = send_co_req(fd, (SheepdogReq *)&hdr, name, &wlen);
This is a coroutine function, it may yield. It seems sd_delete() and
sd_snapshot_goto() are not coroutine functions, so this call is not
allowed.
You'll see a crash if the socket I/O returns EAGAIN. Then
qemu_coroutine_yield() will abort.
prev parent reply other threads:[~2013-04-24 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 9:46 [Qemu-devel] [PATCH] sheepdog: fix loadvm operation Liu Yuan
2013-04-24 14:53 ` Stefan Hajnoczi [this message]
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=20130424145350.GG24635@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=morita.kazutaka@lab.ntt.co.jp \
--cc=namei.unix@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=sheepdog@lists.wpkg.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).