From: NeilBrown Date: Mon, 31 Jan 2011 06:04:37 +0000 (+1100) Subject: Grow: round max_progress to old chunk size too. X-Git-Tag: mdadm-3.2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f913e9b21cba3e522283b7f23d09fcddc37c218;p=thirdparty%2Fmdadm.git Grow: round max_progress to old chunk size too. kernel requires sync_max to be a multiple of the current chunk size. This is not really 'correct', but we need to work with it. So round down. Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index b81f09eb..748fbf68 100644 --- a/Grow.c +++ b/Grow.c @@ -2429,6 +2429,9 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape, /* Round to chunk size as some kernels give an erroneously high number */ max_progress /= info->new_chunk/512; max_progress *= info->new_chunk/512; + /* And round to old chunk size as the kernel wants that */ + max_progress /= info->array.chunk_size/512; + max_progress *= info->array.chunk_size/512; /* Limit progress to the whole device */ if (max_progress > info->component_size) max_progress = info->component_size;