From: Artem Bityutskiy Date: Sat, 19 Apr 2008 17:44:31 +0000 (+0300) Subject: UBI: fix mean EC calculation X-Git-Tag: v2.6.26-rc1~1069^2~11^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bc1dca4b0eb4dfbf100895bfc1256f21e3c901a;p=pandora-kernel.git UBI: fix mean EC calculation (a + b) / (c + d) != a / c + b / d. The old code errornously assumed this incorrect formuld. Instead, just sum all erase counters in a 64-bit variable and divide to the number of EBs at the end. Thanks to Adrian Hunter for pointing this out. Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed