Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759662AbZCZQZV (ORCPT ); Thu, 26 Mar 2009 12:25:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756423AbZCZQZF (ORCPT ); Thu, 26 Mar 2009 12:25:05 -0400 Received: from cantor.suse.de ([195.135.220.2]:57255 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754773AbZCZQZD (ORCPT ); Thu, 26 Mar 2009 12:25:03 -0400 Date: Thu, 26 Mar 2009 17:24:58 +0100 From: Jan Kara To: Linus Torvalds Cc: Theodore Tso , Andrew Morton , Ingo Molnar , Alan Cox , Arjan van de Ven , Peter Zijlstra , Nick Piggin , Jens Axboe , David Rees , Jesper Krogh , Linux Kernel Mailing List Subject: Re: Linux 2.6.29 Message-ID: <20090326162458.GA17159@duck.suse.cz> References: <20090325123744.GK23439@duck.suse.cz> <20090325150041.GM32307@mit.edu> <20090325185824.GO32307@mit.edu> <20090325215137.GQ32307@mit.edu> <20090326002253.GC11024@duck.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1286 Lines: 30 On Wed 25-03-09 18:34:32, Linus Torvalds wrote: > On Thu, 26 Mar 2009, Jan Kara wrote: > > > > 1) We have to writeout blocks full of zeros on allocation so that we don't > > expose unallocated data => slight slowdown > > Why? > > This is in _no_ way different from a regular "write()" system call. And > there, we just attach the buffers to the page. If something crashes before > the page actually gets written out, then we'll have hopefully never > written out the metadata (that's what "data=ordered" means). Sorry, I wasn't exact enough. We'll attach buffers to the running transaction and they'll get written out at the transaction commit which is usually earlier than when the writepage() is called and then later writepage() will write the data again (this is a consequence of the fact that JBD commit code just writes buffers without calling clear_page_dirty_for_io())... At least ext4 has this fixed because JBD2 already writes out ordered data via writepages(). Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/