diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-04-13 02:38:06 -0400 |
---|---|---|
committer | Tao Ma <tao.ma@oracle.com> | 2010-04-13 02:38:06 -0400 |
commit | 8571882c21e5073b2f96147ec4ff9b7042339e1b (patch) | |
tree | 1f7925e293e656e5c1c6cd2c2876ea977a7277e5 /fs/ocfs2/resize.c | |
parent | 4711954eaa8d30f653fda238cecf919f1ae40d6f (diff) |
ocfs2: ocfs2_group_bitmap_size has to handle old volume.
ocfs2_group_bitmap_size has to handle the case when the
volume don't have discontiguous block group support. So
pass the feature_incompat in and check it.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/resize.c')
-rw-r--r-- | fs/ocfs2/resize.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c index 5bbfc123781f..dacd553d8617 100644 --- a/fs/ocfs2/resize.c +++ b/fs/ocfs2/resize.c | |||
@@ -315,7 +315,8 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters) | |||
315 | BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); | 315 | BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); |
316 | 316 | ||
317 | if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != | 317 | if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != |
318 | ocfs2_group_bitmap_size(osb->sb, 0) * 8) { | 318 | ocfs2_group_bitmap_size(osb->sb, 0, |
319 | osb->s_feature_incompat) * 8) { | ||
319 | mlog(ML_ERROR, "The disk is too old and small. " | 320 | mlog(ML_ERROR, "The disk is too old and small. " |
320 | "Force to do offline resize."); | 321 | "Force to do offline resize."); |
321 | ret = -EINVAL; | 322 | ret = -EINVAL; |
@@ -496,7 +497,8 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input) | |||
496 | fe = (struct ocfs2_dinode *)main_bm_bh->b_data; | 497 | fe = (struct ocfs2_dinode *)main_bm_bh->b_data; |
497 | 498 | ||
498 | if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != | 499 | if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != |
499 | ocfs2_group_bitmap_size(osb->sb, 0) * 8) { | 500 | ocfs2_group_bitmap_size(osb->sb, 0, |
501 | osb->s_feature_incompat) * 8) { | ||
500 | mlog(ML_ERROR, "The disk is too old and small." | 502 | mlog(ML_ERROR, "The disk is too old and small." |
501 | " Force to do offline resize."); | 503 | " Force to do offline resize."); |
502 | ret = -EINVAL; | 504 | ret = -EINVAL; |