From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Wen Congyang <wency@cn.fujitsu.com>
Cc: qemu-devl <qemu-devel@nongnu.org>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] quorum: don't share qiov
Date: Tue, 03 Feb 2015 12:01:49 +0100 [thread overview]
Message-ID: <54D0AA9D.7040404@redhat.com> (raw)
In-Reply-To: <20150203092153.GA4488@noname.redhat.com>
On 03/02/2015 10:22, Kevin Wolf wrote:
> Paolo, I think it's rather surprising that iov_send_recv() modifies its
> iov. The modification is undone at the end, so you seem to have
> considered that a caller might be reusing it after and you can't "use it
> up", but we still get problems with concurrent accesses.
Yes, I wasn't thinking of concurrent accesses indeed. But I wasn't the
author of iov_send_recv(), I just took it from sheepdog. :)
> Was it an intentional design decision that iov_send_recv() is the sole
> owner of the iov and the caller must duplicate it if it's used elsewhere
> concurrently?
>
> Otherwise I would suggest to fix iov_send_recv(), and possibly try and
> make all the qiov/iov arguments in the block layer const.
I agree. However, it's not a small change. I think Wen's patch is okay
with a FIXME comment added.
Paolo
next prev parent reply other threads:[~2015-02-03 11:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 8:07 [Qemu-devel] [PATCH] quorum: don't share qiov Wen Congyang
2015-01-30 13:39 ` Kevin Wolf
2015-02-02 1:19 ` Wen Congyang
2015-02-03 9:22 ` Kevin Wolf
2015-02-03 11:01 ` Paolo Bonzini [this message]
2015-02-09 2:10 ` Wen Congyang
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=54D0AA9D.7040404@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wency@cn.fujitsu.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).