From: Bernd Schubert <bs_lists@aakef.fastmail.fm>
To: linux-ext4@vger.kernel.org
Subject: ext2fs_dir_iterate2 and ext2_dir_entry
Date: Thu, 2 Sep 2010 22:40:41 +0200 [thread overview]
Message-ID: <201009022240.41751.bs_lists@aakef.fastmail.fm> (raw)
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
reply other threads:[~2010-09-02 20:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009022240.41751.bs_lists@aakef.fastmail.fm \
--to=bs_lists@aakef.fastmail.fm \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).