[Ocfs2-tools-devel] [PATCH 2/2] mkfs.ocfs2: Fix mkfs_swap_dir()
Sunil Mushran
sunil.mushran at oracle.com
Tue May 5 18:16:30 PDT 2009
This patch fixes two small bugs in mkfs_swap_dir().
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---
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
More information about the Ocfs2-tools-devel
mailing list