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 05:07:55 -0400 Message-ID: <20100817090755.GA11110@infradead.org> References: <4C694483.5010903@msgid.tls.msk.ru> <4C694E7D.3060600@codemonkey.ws> <20100816184237.GA16579@infradead.org> <4C69A0C4.2080102@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]:36741 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730Ab0HQJH5 (ORCPT ); Tue, 17 Aug 2010 05:07:57 -0400 Content-Disposition: inline In-Reply-To: <4C69A0C4.2080102@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: 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, and even more importantly the disk write cache is never flushed. In short it's completely worthless for any real filesystem.