From: Eric Sandeen Subject: Re: [PATCH] ext3: Avoid false EIO errors Date: Mon, 30 Mar 2009 08:53:42 -0500 Message-ID: <49D0CEE6.2060409@redhat.com> References: <1238091711-23464-1-git-send-email-jack@suse.cz> <20090327180806.GB2810@skywalker> <20090327202421.GB31071@duck.suse.cz> <20090330082532.GA15488@skywalker> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jan Kara , linux-ext4@vger.kernel.org, Andrew Morton To: "Aneesh Kumar K.V" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:49978 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbZC3Nya (ORCPT ); Mon, 30 Mar 2009 09:54:30 -0400 In-Reply-To: <20090330082532.GA15488@skywalker> Sender: linux-ext4-owner@vger.kernel.org List-ID: Aneesh Kumar K.V wrote: > We do a vmtruncate if we failed to allocate blocks in > ext3_write_begin. That is done after the closing the current > transaction. If we crash in between (ie, after committing the > transaction allocating blocks and before committing the transaction that > is doing truncate) we would only have some data blocks leaking. But > that would be better than user seeing zero's in the file ?. Also if we > happen to add the inode to the orphan list and crash, the recovery would > truncate it properly. So by doing a vmtruncate I guess the window would be > small and we are already doing that in ext3_write_begin. I don't agree that leaking data blocks is better than exposing zeros... the former is a security flaw, the latter a (significant) annoyance. -Eric