linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix wrong name_len and file_type in intermediate htree nodes
@ 2009-08-30 14:56 Andreas Schlick
  2009-08-30 14:57 ` [PATCH 1/2] ext4: Always set dx_node's fake_dirent explicitly Andreas Schlick
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schlick @ 2009-08-30 14:56 UTC (permalink / raw)
  To: Ext4 Developers List

Hello,

while testing the dirshrink patch, I found that sometimes intermediate htree 
nodes end up with their fake_dirent's name_len and file_type not being zero. 
e2fsck will then consider the htree to be corrupted as it doesn't recognise 
that these blocks contain dx_nodes. 

As far as I understand it, this happens sometimes when ext4_dx_add_entry() has 
to create a new index node and calls ext4_append(). In the end ext4_getblk() 
is called and it might get a buffer that has BH_Uptodate set, causing 
ext4_getblk() to not zero it out and leave the old content intact. 

I can reproduce this with plain linux-2.6.30.5. To produce this I use a nearly 
full filesystem and continuously create new files in one directory while 
removing other directories/files at the same time. 

Do I understand it correctly, that it happens when the newly allocated block 
(for the new index node) was very recently used by another file/directory, so 
that it is still in the buffer cache? But it surprises me that it doesn't 
happen more often.

Andreas Schlick


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

end of thread, other threads:[~2009-09-11  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-30 14:56 [PATCH 0/2] Fix wrong name_len and file_type in intermediate htree nodes Andreas Schlick
2009-08-30 14:57 ` [PATCH 1/2] ext4: Always set dx_node's fake_dirent explicitly Andreas Schlick
2009-08-30 14:58   ` [PATCH 2/2] ext3: " Andreas Schlick
2009-09-11  3:19   ` [PATCH 1/2] ext4: " Theodore Tso

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).