[Ocfs2-devel] [PATCH 4/6] Modfiy cl_cpg in global_bitmap to be
maximum value during mkfs,take 1
Tao Ma
tao.ma at oracle.com
Fri Nov 16 00:47:27 PST 2007
cl_cpg is used in ocfs2 kernel to calculate the group no
for a given cluster. Change it to maximum number so that
there is no need to update it durin online resize.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fsck.ocfs2/pass0.c | 2 +-
mkfs.ocfs2/mkfs.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
fe4f6a9996e36994e36196422efac3665dca90f8
diff --git a/fsck.ocfs2/pass0.c b/fsck.ocfs2/pass0.c
index d53c76d..1e4c243 100644
--- a/fsck.ocfs2/pass0.c
+++ b/fsck.ocfs2/pass0.c
@@ -393,7 +393,7 @@ static void mark_group_used(o2fsck_state
}
/*
- * Due to a glitch in mkfs, cl->cl_cpg for the GLOBAL BITMAP could be
+ * Due to a glitch in old mkfs, cl->cl_cpg for the GLOBAL BITMAP could be
* less than the max possible for volumes having just one cluster
* group. Fix.
*/
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index 0ade0ab..57784a6 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -1910,7 +1910,8 @@ format_file(State *s, SystemFileDiskReco
if (rec->cluster_bitmap) {
di->id2.i_chain.cl_count =
ocfs2_chain_recs_per_inode(s->blocksize);
- di->id2.i_chain.cl_cpg = s->global_cpg;
+ di->id2.i_chain.cl_cpg =
+ ocfs2_group_bitmap_size(s->blocksize) * 8;
di->id2.i_chain.cl_bpc = 1;
if (s->nr_cluster_groups >
ocfs2_chain_recs_per_inode(s->blocksize)) {
--
1.3.3
More information about the Ocfs2-devel
mailing list