From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws95s-0008Dv-Pq for qemu-devel@nongnu.org; Wed, 04 Jun 2014 07:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ws95l-0001s2-AR for qemu-devel@nongnu.org; Wed, 04 Jun 2014 07:10:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws95k-0001rw-SH for qemu-devel@nongnu.org; Wed, 04 Jun 2014 07:10:49 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s54BAmsM019580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 4 Jun 2014 07:10:48 -0400 Message-ID: <538EFEB5.8020202@redhat.com> Date: Wed, 04 Jun 2014 13:10:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1401799978-9558-1-git-send-email-famz@redhat.com> <1401799978-9558-6-git-send-email-famz@redhat.com> <538DCF99.9030602@redhat.com> <20140604075354.GC3223@T430.nay.redhat.com> <538EDBDC.2060701@redhat.com> <20140604110316.GD3223@T430.nay.redhat.com> In-Reply-To: <20140604110316.GD3223@T430.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] virtio-blk: Drop VirtIOBlockReq.read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi Il 04/06/2014 13:03, Fam Zheng ha scritto: > On Wed, 06/04 10:42, Paolo Bonzini wrote: >> Il 04/06/2014 09:53, Fam Zheng ha scritto: >>>>> For the sake of restarting requests, we also need dataplane to populate the >>>>> "out" field for dataplane. We can also take the occasion to change it from >>>>> "struct virtio_blk_outhdr *" to "struct virtio_blk_outhdr" for non-dataplane >>>>> and use iov_discard_front on the elem (see dataplane's process_request >>>>> function). >>> Using pointer avoids copying, what's the advantage of converting to "sturct >>> virtio_blk_outhdr" for non-dataplane code? For thread-safety? >> >> The virtio code currently assumes that the outhdr is in its own iovec. This >> is not guaranteed by the spec, it's just that the drivers do it because QEMU >> required it. > > I see, thanks. Will convert it. IIUC, this also applies to inhdr? Do we need to > fix them as well? No, but only because inhdr is a single byte. Paolo