[Ocfs2-tools-devel] [PATCH 5/9] fsck.ocfs2: Implement Pass 1C, scanning for inode names.
Tao Ma
tao.ma at oracle.com
Fri Jul 31 00:24:28 PDT 2009
Joel Becker wrote:
> Pass 1C scans the directory tree to provide names for any inode owning
> multiply-claimed clusters. This allows Pass 1D to print readable names
> when asking questions.
>
> Signed-off-by: Joel Becker <joel.becker at oracle.com>
> ---
<snip>
> +
> +static void name_inode(struct dir_scan_context *scan,
> + struct ocfs2_dir_entry *de)
> +{
> + struct dup_inode *di = dup_inode_lookup(scan->ds_dct, de->inode);
> +
> + if (!di || di->di_path)
> + return;
> +
> + scan->ds_inodes_left--;
How do we handle hard link here? It is initialized as the inode count,
but decreased whenever we see a dentry, so the hard link will eat up our
ds_inodes_left I guess?
> +
> + di->di_path = de_to_path(scan, de);
> + if (!di->di_path)
> + pass1c_warn(OCFS2_ET_NO_MEMORY);
> +}
> +
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list