All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org,
	MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>,
	stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] block:avoid deadlock in sheepdog.c
Date: Tue, 22 Nov 2011 10:35:12 +0100	[thread overview]
Message-ID: <4ECB6CD0.8010906@redhat.com> (raw)
In-Reply-To: <1321930618-607-1-git-send-email-wdongxu@linux.vnet.ibm.com>

Am 22.11.2011 03:56, schrieb Dong Xu Wang:
> From: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> 
> s->lock should be unlocked before leaving add_aio_request.
> 
> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>

Thanks, applied to the block-stable branch (for 1.0). But please keep
Kazutaka CCed for future Sheepdog patches.

Kevin

> ---
>  block/sheepdog.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index 9f80609..62f1f3a 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -1116,6 +1116,7 @@ static int coroutine_fn add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
>      /* send a header */
>      ret = do_write(s->fd, &hdr, sizeof(hdr));
>      if (ret) {
> +        qemu_co_mutex_unlock(&s->lock);
>          error_report("failed to send a req, %s", strerror(errno));
>          return -EIO;
>      }
> @@ -1123,6 +1124,7 @@ static int coroutine_fn add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
>      if (wlen) {
>          ret = do_writev(s->fd, iov, wlen, aio_req->iov_offset);
>          if (ret) {
> +            qemu_co_mutex_unlock(&s->lock);
>              error_report("failed to send a data, %s", strerror(errno));
>              return -EIO;
>          }

      reply	other threads:[~2011-11-22  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  2:56 [Qemu-devel] [PATCH] block:avoid deadlock in sheepdog.c Dong Xu Wang
2011-11-22  9:35 ` Kevin Wolf [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=4ECB6CD0.8010906@redhat.com \
    --to=kwolf@redhat.com \
    --cc=morita.kazutaka@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wdongxu@linux.vnet.ibm.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 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.