summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-02-03 07:40:18 +0100
committerNeilBrown <neilb@suse.de>2011-02-03 07:40:18 +0100
commit02eedb57aa0c6f7fdeda1b612f35545ab4eee58f (patch)
tree11b6942807748269e489f5d2174744beaac29a28 /managemon.c
parentFIX: Last checkpoint is not set (diff)
downloadmdadm-02eedb57aa0c6f7fdeda1b612f35545ab4eee58f.tar.xz
mdadm-02eedb57aa0c6f7fdeda1b612f35545ab4eee58f.zip
imsm: FIX: array size is wrong
Calculation of size is almost ok, except concept of blocks. Size for setting in md has to be divided by 2 to be correct. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/managemon.c b/managemon.c
index 63c97056..6001f6a9 100644
--- a/managemon.c
+++ b/managemon.c
@@ -549,9 +549,9 @@ static void manage_member(struct mdstat_ent *mdstat,
disk_init_and_add(newd, d, newa);
}
if (sysfs_get_ll(info, NULL, "array_size", &array_size) == 0
- && a->info.custom_array_size > array_size) {
+ && a->info.custom_array_size > array_size*2) {
sysfs_set_num(info, NULL, "array_size",
- a->info.custom_array_size);
+ a->info.custom_array_size/2);
}
out2:
sysfs_free(info);