https://github.com/torvalds/linux
Revision dd71cf6b2773310b01c6fe6c773064c80fd2476b authored by NeilBrown on 07 May 2009, 02:49:35 UTC, committed by NeilBrown on 07 May 2009, 02:49:35 UTC
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>
1 parent db305e5
History
Tip revision: dd71cf6b2773310b01c6fe6c773064c80fd2476b authored by NeilBrown on 07 May 2009, 02:49:35 UTC
md: tidy up status_resync to handle large arrays.
Tip revision: dd71cf6
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 885 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.6 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 144.4 KB
Makefile -rw-r--r-- 53.8 KB
README -rw-r--r-- 16.7 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top