From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: JFYI: ext4 bug triggerable by kvm Date: Tue, 17 Aug 2010 07:56:04 -0500 Message-ID: <4C6A86E4.9080600@codemonkey.ws> References: <4C694483.5010903@msgid.tls.msk.ru> <4C694E7D.3060600@codemonkey.ws> <20100816184237.GA16579@infradead.org> <4C69A0C4.2080102@codemonkey.ws> <20100817090755.GA11110@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Michael Tokarev , KVM list , Kevin Wolf To: Christoph Hellwig Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:34523 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261Ab0HQM4H (ORCPT ); Tue, 17 Aug 2010 08:56:07 -0400 Received: by yxg6 with SMTP id 6so2441244yxg.19 for ; Tue, 17 Aug 2010 05:56:07 -0700 (PDT) In-Reply-To: <20100817090755.GA11110@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: On 08/17/2010 04:07 AM, Christoph Hellwig wrote: > On Mon, Aug 16, 2010 at 03:34:12PM -0500, Anthony Liguori wrote: > >> On 08/16/2010 01:42 PM, Christoph Hellwig wrote: >> >>> On Mon, Aug 16, 2010 at 09:43:09AM -0500, Anthony Liguori wrote: >>> >>>>> Also, ext4 is _very_ slow on O_SYNC writes (which is >>>>> used in kvm with default cache). >>>>> >>>> Yeah, we probably need to switch to sync_file_range() to avoid the >>>> journal commit on every write. >>>> >>>> >>> No, we don't. sync_file_range does not actually provide any data >>> integrity. >>> >> What do you mean by data integrity? >> > sync_file_range only does pagecache-level writeout of the file data. > It nevers calls into the actual filesystem, that means any block > allocations (for filling holes / converting preallocated space in normal > filesystems, or every write in COW-based filesstems like qcow2) never > get flushes to disk, But assuming that you had a preallocated disk image, it would effectively flush the page cache so it sounds like the only real issue is sparse and growable files. > and even more importantly the disk write cache is > never flushed. > The point is that we don't want to flush the disk write cache. The intention of writethrough is not to make the disk cache writethrough but to treat the host's cache as writethrough. Regards, Anthony Liguori > In short it's completely worthless for any real filesystem. > >