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:
parent
ec757320c2
commit
2f3dd5e4bc
8
Grow.c
8
Grow.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue