[Ocfs2-tools-devel] [PATCH] Fix indexed directories
Joel Becker
jlbec at evilplan.org
Fri Jun 29 02:20:38 PDT 2012
On Thu, Jun 28, 2012 at 03:45:10PM -0500, Goldwyn Rodrigues wrote:
> Detect if iteration of an indexed directory failed. If failed, clear the
> index flags, and add it to the reindexing list.
>
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>
>
> ---
> fsck.ocfs2/fsck.ocfs2.checks.8.in | 5 +++++
> fsck.ocfs2/pass1.c | 12 ++++++++----
> fsck.ocfs2/pass2.c | 14 +++++++++++---
> 3 files changed, 24 insertions(+), 7 deletions(-)
>
> Index: ocfs2-tools/fsck.ocfs2/pass2.c
> ===================================================================
> --- ocfs2-tools.orig/fsck.ocfs2/pass2.c 2011-02-17 19:38:51.000000000 +0100
> +++ ocfs2-tools/fsck.ocfs2/pass2.c 2012-05-30 23:06:38.000000000 +0200
> @@ -732,6 +732,13 @@ static unsigned pass2_dir_block_iterate(
> verbosef("dir inode %"PRIu64" i_size %"PRIu64"\n",
> dbe->e_ino, (uint64_t)di->i_size);
>
> + /* Set the flag for index rebuilding */
> + if (ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super))
> + && !(di->i_dyn_features & OCFS2_INLINE_DATA_FL)
> + && !(di->i_dyn_features & OCFS2_INDEXED_DIR_FL)) {
> + ret_flags |= OCFS2_DIRENT_CHANGED;
> + }
> +
This hunk appears to be in the tree already from commit d2429e11? And
we unconditionally build indexes for all directories in fsck? I'm not
sure I'm OK with that.
Joel
--
"Up and down that road in our worn out shoes,
Talking bout good things and singing the blues."
http://www.jlbec.org/
jlbec at evilplan.org
More information about the Ocfs2-tools-devel
mailing list