[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] quorum: don't share qiov

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] quorum: don't share qiov
Date: Tue, 03 Feb 2015 12:01:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]