ext2fs_dir_iterate2 and ext2_dir_entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux