linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kernel thread to zero itables for lazy_itable_init?
@ 2009-06-10 22:41 Howard Cochran
  2009-06-11  5:37 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Howard Cochran @ 2009-06-10 22:41 UTC (permalink / raw)
  To: linux-ext4

Greetings.

What is the status of the code to start a background kernel thread to 
zero the inode tables when filesystem that was created with mke2fs -E 
lazy_itable_init is mounted?  All I have found is a patch set posted to 
this mailing list back on November 21, 2008 and some discussion of the 
implementation, but nothing after that.

Is this effort still alive?

On a related note, from what I have read here, and from looking at the 
ext4 kernel code, the filesystem itself never really requires the inode 
tables to be zeroed out.  The only reason one might want to do that is 
so that fsck does not detect false errors. 

But, in data=ordered mode, would not marking the inode as allocated in 
the bitmap be done in the same journal transaction as populating the 
inode on disk (as well as creating a directory entry pointing to it)?  
And, unless the journal is broken, then either all that succeeds or none 
of it does.  So outside of a hardware failure, or data being overwritten 
directly on the block device, it's not possible for an "actually in-use" 
inode to be marked unallocated in the inode bitmap.

So, I am wondering whether we really need the complexity of a kernel 
thread to zero out the itable (or the long delay of doing it during 
mke2fs).  Instead, would it not be better to modify fsck to ignore 
garbage in unallocated inodes, at least for filesystems that have a journal.

Thanks,
Howard Cochran


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Kernel thread to zero itables for lazy_itable_init?
  2009-06-10 22:41 Kernel thread to zero itables for lazy_itable_init? Howard Cochran
@ 2009-06-11  5:37 ` Andreas Dilger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2009-06-11  5:37 UTC (permalink / raw)
  To: Howard Cochran; +Cc: linux-ext4

On Jun 10, 2009  18:41 -0400, Howard Cochran wrote:
> What is the status of the code to start a background kernel thread to  
> zero the inode tables when filesystem that was created with mke2fs -E  
> lazy_itable_init is mounted?  All I have found is a patch set posted to  
> this mailing list back on November 21, 2008 and some discussion of the  
> implementation, but nothing after that.
>
> Is this effort still alive?

I don't think anyone is currently working on it.

> On a related note, from what I have read here, and from looking at the  
> ext4 kernel code, the filesystem itself never really requires the inode  
> tables to be zeroed out.  The only reason one might want to do that is  
> so that fsck does not detect false errors. 

Correct, but the risk is that the whole filesystem could become corrupted
by the old data in the inode table.

> So, I am wondering whether we really need the complexity of a kernel  
> thread to zero out the itable (or the long delay of doing it during  
> mke2fs).  Instead, would it not be better to modify fsck to ignore  
> garbage in unallocated inodes, at least for filesystems that have a 
> journal.

Sure, e2fsck already does that, but this is not totally robust.  If
the marker for unallocated inodes itself becomes corrupted (which
will happen eventually, or e2fsck wouldn't ever be needed) then the
aforementioned filesystem-wide corruption could ensue.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-11  5:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-10 22:41 Kernel thread to zero itables for lazy_itable_init? Howard Cochran
2009-06-11  5:37 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).