Remove write_range from calculation of max_progress

It isn't needed as we always work in multiples of full
destination stripes.

Also multiply by 'after' disks, not before.

We can progress until the point we would write then lines up with
where we would read now.
We read now from
  array-address: reshape_progress   device-address: read_offset
So we write then to
  device-address: read_offset    array-address:  read_offset * after.disks

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-01-11 15:07:57 +11:00
parent ec757320c2
commit 2f3dd5e4bc
1 changed files with 4 additions and 4 deletions

8
Grow.c
View File

@ -2323,8 +2323,8 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
need_backup = 1;
} else {
max_progress =
(read_offset - write_range) *
reshape->before.data_disks;
read_offset *
reshape->after.data_disks;
}
} else {
if (read_offset > write_offset - write_range) {
@ -2333,8 +2333,8 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
need_backup = 1;
} else {
max_progress =
(read_offset + write_range) *
reshape->before.data_disks;
read_offset *
reshape->after.data_disks;
/* If we are using internal metadata, then we can
* progress all the way to the suspend_point without
* worrying about backing-up/suspending along the