[Ocfs2-tools-devel] [PATCH 2/2] mkfs.ocfs2: Fix mkfs_swap_dir()
Joel Becker
Joel.Becker at oracle.com
Tue May 5 18:26:01 PDT 2009
On Tue, May 05, 2009 at 06:16:30PM -0700, Sunil Mushran wrote:
> This patch fixes two small bugs in mkfs_swap_dir().
>
> Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
Sob
> ---
> mkfs.ocfs2/mkfs.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
> index d75cd57..a84b725 100644
> --- a/mkfs.ocfs2/mkfs.c
> +++ b/mkfs.ocfs2/mkfs.c
> @@ -2270,7 +2270,8 @@ static void mkfs_swap_dir(State *s, DirData *dir,
>
> fill_fake_fs(s, &fake_fs, super_buf);
> if (!s->inline_data || !dir->record->dir_data)
> - end = ocfs2_dir_trailer_blk_off(&fake_fs);
> + if (ocfs2_supports_dir_trailer(&fake_fs))
> + end = ocfs2_dir_trailer_blk_off(&fake_fs);
>
> while (offset < dir->record->file_size) {
> trailer = ocfs2_dir_trailer_from_block(&fake_fs, p);
> @@ -2280,7 +2281,7 @@ static void mkfs_swap_dir(State *s, DirData *dir,
> /* Remember, this does nothing if the feature isn't set */
> ocfs2_compute_meta_ecc(&fake_fs, p, &trailer->db_check);
> offset += s->blocksize;
> - p += offset;
> + p += s->blocksize;
> }
> }
>
> --
> 1.5.6.3
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
--
Life's Little Instruction Book #356
"Be there when people need you."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list