From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: the >1Tb block issue Date: Wed, 19 May 2010 12:03:59 +0300 Message-ID: <4BF3A97F.5000207@redhat.com> References: <4BF2B7CD.7090204@msgid.tls.msk.ru> <4BF2CE70.1060402@redhat.com> <4BF2CFAB.1010505@msgid.tls.msk.ru> <4BF2D08E.7000505@redhat.com> <20100519085722.GA4343@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Michael Tokarev , KVM list , Christoph Hellwig To: Christoph Hellwig Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46983 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756562Ab0ESJEO (ORCPT ); Wed, 19 May 2010 05:04:14 -0400 In-Reply-To: <20100519085722.GA4343@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: On 05/19/2010 11:57 AM, Christoph Hellwig wrote: > On Tue, May 18, 2010 at 08:38:22PM +0300, Avi Kivity wrote: >> Yes. Why would Linux post overlapping requests? makes >> 0xffffffff00000000 sense. >> >> There may be a guest bug in here too. Christoph? > > Overlapping writes are entirely fine from the guest POV, although they > should be rather unusual. We can update a page and send it out again > when it gets redirtied while still out on the wire. But the device may reorder requests: system device issue request r1 for sector n page p dma into buffer b1 modify contents of page p issue request r2 for sector n page p dma into buffer b2 complete r2 complete r1 Is there any guarantee r2 will complete after r1, or that b1 and b2 are coherent? I'm not aware of any. What about NFS O_DIRECT backing virtio-blk? Here, requests can definitely be reordered, and the buffers are certainly not coherent (since they're don't even exist once the data has left the NIC). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.