From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: JFYI: ext4 bug triggerable by kvm Date: Tue, 17 Aug 2010 10:45:07 -0400 Message-ID: <20100817144507.GA10280@infradead.org> References: <4C694483.5010903@msgid.tls.msk.ru> <4C694E7D.3060600@codemonkey.ws> <20100816184237.GA16579@infradead.org> <4C69A0C4.2080102@codemonkey.ws> <20100817090755.GA11110@infradead.org> <4C6A86E4.9080600@codemonkey.ws> <20100817130702.GA16635@infradead.org> <4C6A9AB5.6050404@codemonkey.ws> <20100817142808.GA22412@infradead.org> <4C6A9F13.9030104@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Michael Tokarev , KVM list , Kevin Wolf To: Anthony Liguori Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:41640 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971Ab0HQOpI (ORCPT ); Tue, 17 Aug 2010 10:45:08 -0400 Content-Disposition: inline In-Reply-To: <4C6A9F13.9030104@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 17, 2010 at 09:39:15AM -0500, Anthony Liguori wrote: > The type of cache we present to the guest only should relate to how > the hypervisor caches the storage. It should be independent of how > data is cached by the disk. It is. > There can be many levels of caching in a storage hierarchy and each > hierarchy cached independently of the next level. > > If the user has a disk with a writeback cache, if we expose a > writethrough cache to the guest, it's not our responsibility to make > sure that we break through the writeback cache on the disk. The users doesn't know or have to care about the caching. The users uses O_SYNC/fsync to tell it wants data on disk, and it's the operating systems job to make that happen. The situation with qemu is the same - if we tell the guest that we do not have a volatile write cache that needs explicit management the guest can rely on the fact that it does not have to do manual cache management.