[Ocfs2-tools-devel] [PATCH] Use e_leaf_clusters instead of e_int_clusters when tree_depth==0
Goldwyn Rodrigues
rgoldwyn at gmail.com
Mon Jan 14 15:28:47 PST 2013
While traversing extents, use e_leaf_clusters instead of e_int_clusters
when tree_depth==0.
This fixes a possible SEGFAULT in big-endian archs while creating an
o2image.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>
---
diff --git a/o2image/o2image.c b/o2image/o2image.c
index 465e7fe..9d23567 100644
--- a/o2image/o2image.c
+++ b/o2image/o2image.c
@@ -113,7 +113,7 @@ static errcode_t traverse_extents(ocfs2_filesys *ofs,
if (ret)
goto out;
} else {
- for (j = 0; j < (rec->e_int_clusters*ost->ost_bpc); j++)
+ for (j = 0; j < (rec->e_leaf_clusters*ost->ost_bpc); j++)
ocfs2_image_mark_bitmap(ofs,
(rec->e_blkno + j));
}
More information about the Ocfs2-tools-devel
mailing list