]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Avoid confusing with 'blocks' number.
authorNeilBrown <neilb@suse.de>
Tue, 11 Jan 2011 03:51:09 +0000 (14:51 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 11 Jan 2011 03:51:09 +0000 (14:51 +1100)
commitb4f8e38b94dc10d7754e19dcc85f88a92c2a4387
treedf2a31ff25c4ce74d12250f46ce13e2c12ddf46e
parent6eb48844a5c3f3638c0ff0359c6e1fc9c3debf8f
Avoid confusing with 'blocks' number.

The 'blocks' number computed by analyse_change is the number of
blocks that it makes sense to back-up at a time.
It is the smallest number of blocks that is a whole number of
stripes in both the old and the new layout.

However we are also using it as the smallest amount of progress
that can be made at a time, which is wrong as it is always valid
to progress a single stripe in the new layout.

So change 'blocks' to be called 'backup_blocks' to make it more clear.
And pass new_chunk size down so it can be used for 'minimum forward
progress' calculations.

Also set 'stripes' (the amount actually backed up) from the
possibly-scaled 'blocks' number rather than ignoring it and using
backup_blocks.

Finally, get rid of 'read_range' as it isn't used (or needed).

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c