linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ext2fs_dir_iterate2 and ext2_dir_entry
@ 2010-09-02 20:40 Bernd Schubert
  0 siblings, 0 replies; only message in thread
From: Bernd Schubert @ 2010-09-02 20:40 UTC (permalink / raw)
  To: linux-ext4

We just run the problem that an e2fsck run long in the past converted files 
into directories on a Lustre OST. At least we need to figure out which files 
these are and the old e2fsck logs have been deleted for a long time already. 
(No idea why we run into the problem today again, I guess some files just 
haven't been accessed all the time). Now we could run "find -type d" and look 
for directories where they don't belong to. And for that customer it even will 
work out, as the number of used inodes is low.
But for other customers, with dozens of million files per OST that would be 
too slow. No Lustre already provides a lfsck tool that can restore consistency 
and in principle we could extend it to also check of the object-ID type.
Unfortunately, the database presently does not get this information and the 
main reason for that is that (*func) as argument of ext2fs_dir_iterate2() does 
not take ext2_dir_entry_2, but only ext2_dir_entry without the filetype.

While tracing that down what needs to be done to upgrade it, I'm getting a bit 
lost. 

In ext2fs_dir_iterate2:

ctx.func = func;


then into ext2fs_block_iterate2(, &ctx):

In ext2fs_block_iterate2() the previous &ctx is priv_data and priv_data is 
again added as ctx:

ctx.priv_data = priv_data;


But from there on I don't see where the direntry is ever filled it. Any hints 
would be appreciated.


Thanks,
Bernd



-- 
Bernd Schubert
DataDirect Networks

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-02 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 20:40 ext2fs_dir_iterate2 and ext2_dir_entry Bernd Schubert

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