diff options
author | NeilBrown <neilb@suse.de> | 2009-05-07 04:49:35 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-07 04:49:35 +0200 |
commit | dd71cf6b2773310b01c6fe6c773064c80fd2476b (patch) | |
tree | 33a4cc4fe4db45ec4f1a8f477bb294a0b685efa4 /kernel/rcutree.c | |
parent | md: fix some (more) errors with bitmaps on devices larger than 2TB. (diff) | |
download | linux-dd71cf6b2773310b01c6fe6c773064c80fd2476b.tar.xz linux-dd71cf6b2773310b01c6fe6c773064c80fd2476b.zip |
md: tidy up status_resync to handle large arrays.
Two problems in status_resync.
1/ It still used Kilobytes as the basic block unit, while most code
now uses sectors uniformly.
2/ It doesn't allow for the possibility that max_sectors exceeds
the range of "unsigned long".
So
- change "max_blocks" to "max_sectors", and store sector numbers
in there and in 'resync'
- Make 'rt' a 'sector_t' so it can temporarily hold the number of
remaining sectors.
- use sector_div rather than normal division.
- change the magic '100' used to preserve precision to '32'.
+ making it a power of 2 makes division easier
+ it doesn't need to be as large as it was chosen when we averaged
speed over the entire run. Now we average speed over the last 30
seconds or so.
Reported-by: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'kernel/rcutree.c')
0 files changed, 0 insertions, 0 deletions