From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPQ1s-0002ao-RQ for qemu-devel@nongnu.org; Fri, 10 Jul 2009 20:01:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPQ1o-0002V1-Cl for qemu-devel@nongnu.org; Fri, 10 Jul 2009 20:01:24 -0400 Received: from [199.232.76.173] (port=54739 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPQ1o-0002Uy-AB for qemu-devel@nongnu.org; Fri, 10 Jul 2009 20:01:20 -0400 Received: from mail2.shareable.org ([80.68.89.115]:59663) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPQ1n-0008Pl-Ky for qemu-devel@nongnu.org; Fri, 10 Jul 2009 20:01:19 -0400 Date: Sat, 11 Jul 2009 01:01:16 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] bidirectional data exchange between guest and host without network Message-ID: <20090711000116.GF30322@shareable.org> References: <59673.89.3.148.243.1246956346.squirrel@webmail.aql.fr> <20090707090213.GB5690@shareable.org> <53352.89.3.148.243.1246972290.squirrel@webmail.aql.fr> <20090707141204.GL15751@csclub.uwaterloo.ca> <20090707143925.GA14392@shareable.org> <42816.89.3.148.243.1247047400.squirrel@webmail.aql.fr> <20090708133059.GQ15751@csclub.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090708133059.GQ15751@csclub.uwaterloo.ca> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lennart Sorensen Cc: Anthony Lannuzel , qemu-devel@nongnu.org Lennart Sorensen wrote: > On Wed, Jul 08, 2009 at 12:03:20PM +0200, Anthony Lannuzel wrote: > > I tried using a fat partition with the "sync" mount option, to avoid > > caching on both sides (still using virtio on /dev/sda8 on the host and > > /dev/vda on the guest). > > sync only affects write caching, it does nothing for read caching, > which is where your real problem is. > > > The host now reads data written by the guest but the guest does not see > > the host data. > > > > Is there anything related to virtio that prevents this from working, as I > > think the mount option provides me with a filesystem that fulfils the > > conditions you just told me ? > > Just the fact any sane OS does read caching is what makes it not work. > Filesystems are NOT going to do this for you. You can not share > filesystems like that unless explicitly designed for it. Many guest OSes have O_DIRECT or equivalent. That bypasses read and write caching, and can be used for direct access to the underlying block device. You can share data over a block device that way, by _not_ using a filesystem, only using your own protocol on the block filesystem. -- Jamie