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 <neilb@suse.de>
This commit is contained in:
parent
0d711ba4d3
commit
7f913e9b21
3
Grow.c
3
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;
|
||||
|
|
Loading…
Reference in New Issue