Last patch was bogus, this is the correct fix (I hope).
--- diff/drivers/md/dm-iostats.c	2002-12-17 17:02:14.000000000 +0000
+++ source/drivers/md/dm-iostats.c	2002-12-17 17:01:42.000000000 +0000
@@ -147,7 +147,7 @@
 	*n = 0;
 	while (a >= b) {
 		for (acc = b, prev = 0, i = 1;
-		     (acc <= a) && i;
+		     (acc <= a) && (acc > prev);
 		     prev = acc, acc <<= 1, i <<= 1)
 			;
 
