From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKdm9-0000XZ-6O for qemu-devel@nongnu.org; Sun, 08 Feb 2015 21:08:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKdm4-0000zT-76 for qemu-devel@nongnu.org; Sun, 08 Feb 2015 21:08:37 -0500 Received: from [59.151.112.132] (port=39543 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKdm3-0000zD-S4 for qemu-devel@nongnu.org; Sun, 08 Feb 2015 21:08:32 -0500 Message-ID: <54D81726.9060000@cn.fujitsu.com> Date: Mon, 9 Feb 2015 10:10:46 +0800 From: Wen Congyang MIME-Version: 1.0 References: <54CB3BB4.80406@cn.fujitsu.com> <20150130133955.GB24537@noname.redhat.com> <54CED08C.2080501@cn.fujitsu.com> <20150203092153.GA4488@noname.redhat.com> <54D0AA9D.7040404@redhat.com> In-Reply-To: <54D0AA9D.7040404@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] quorum: don't share qiov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devl , Stefan Hajnoczi On 02/03/2015 07:01 PM, Paolo Bonzini wrote: > > > 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. Hi, kevin What should I do next? Add a comment and resend it? Thanks Wen Congyang > > Paolo > . >