aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/cpfile.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-06 22:49:35 -0400
committerNeilBrown <neilb@suse.de>2009-05-06 22:49:35 -0400
commitdd71cf6b2773310b01c6fe6c773064c80fd2476b (patch)
tree33a4cc4fe4db45ec4f1a8f477bb294a0b685efa4 /fs/nilfs2/cpfile.c
parentdb305e507d554430a69ede901a6308e6ecb72349 (diff)
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 'fs/nilfs2/cpfile.c')
0 files changed, 0 insertions, 0 deletions