]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: don't take chunk_size into account for raid1
authorDan Williams <dan.j.williams@intel.com>
Mon, 8 Dec 2008 23:59:18 +0000 (16:59 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 8 Dec 2008 23:59:18 +0000 (16:59 -0700)
Results in chopping off usable parts of the requested size.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
super-intel.c

index 643420d502620ce2b65a0b8cc6ef67656c1b731e..841ba90e2336483ae39f69bd25e9e10fd3513d67 100644 (file)
@@ -2057,7 +2057,10 @@ static __u32 info_to_num_data_stripes(mdu_array_info_t *info)
 
 static __u32 info_to_blocks_per_member(mdu_array_info_t *info)
 {
-       return (info->size * 2) & ~(info_to_blocks_per_strip(info) - 1);
+       if (info->level == 1)
+               return info->size * 2;
+       else
+               return (info->size * 2) & ~(info_to_blocks_per_strip(info) - 1);
 }
 
 static void imsm_update_version_info(struct intel_super *super)