From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: Ext4 data structures integrity Date: Wed, 28 Sep 2011 09:56:26 -0400 Message-ID: <20110928135626.GA19032@thunk.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: "Kasatkin, Dmitry" Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:41362 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752963Ab1I1N43 (ORCPT ); Wed, 28 Sep 2011 09:56:29 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Sep 28, 2011 at 04:42:22PM +0300, Kasatkin, Dmitry wrote: > Hello, > > I have a question about Ext4 data structure integrity. > > On Ext3 file system I was able to modify offline inode block mapping > in such a way, > that 2 inodes did point to the same data blocks, so when modifying one > file, did affect another file.. > FSCK detects such problems and create duplicated blocks, so that inode > content will not overlap... > > Does Ext4 suffers from the same problem? That's not a problem that's a feature! It's REALLY REALLY BAD to try to corrupt the file system the way you are doing. If you at some point delete one of the files, then that block will be marked free, and will get reused for something else, which will then result in all sorts of data consistency problems. Worse yet, if the block gets reused as a directory block, and then you modify the remaining file, you could end up corrupting the file system itself, leading to the loss of access many, many files. Since ext4 uses the same file system consistency checker as ext3, it will also find this sort of file system CORRUPTION, and correct it by duplicating the blocks. Why in the world would you want to do such a crazy thing in the first place? - Ted