From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: orphan cleanup on readonly fs will corrupt future fs! Date: Mon, 28 Feb 2011 00:48:41 -0500 Message-ID: <20110228054841.GR2924@thunk.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Andreas Dilger , Eric Sandeen , Ext4 Developers List To: Amir Goldstein Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:49785 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754436Ab1B1QFe (ORCPT ); Mon, 28 Feb 2011 11:05:34 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: On Sat, Feb 26, 2011 at 08:21:47PM +0200, Amir Goldstein wrote: > Hi guys, > > I have just realized something very disturbing - > that orphan cleanup is not being skipped on readonly mount of ext4/ext3. > > I know that journal recovery is done on readonly mount > and there is problem with that, since nothing happens > in the fs level. > > But orphan cleanup deletes inodes and frees blocks and that > could be very bad for some RO_COMPAT features, SNAPSHOT > and BIGALLOC to name two. Yes, good point. Fortunately it won't be a problem for the BIGALLOC feature, since other changes in the superblock will cause the kernel's sanity checks to refuse to mount it until we teach future kernels how not to freak out when s_blocks_per_group > blocksize * 8, for example. But yes, this is something we should fix. - Ted