Martin K. Petersen 2cda2728aa block: Fix overrun in lcm() and move it to lib
lcm() was defined to take integer-sized arguments.  The supplied
arguments are multiplied, however, causing us to overflow given
sufficiently large input.  That in turn led to incorrect optimal I/O
size reporting in some cases (RAID over RAID).

Switch lcm() over to unsigned long similar to gcd() and move the
function from blk-settings.c to lib.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-03-15 12:47:59 +01:00
..
2007-05-11 05:38:25 -04:00
2008-07-24 10:47:33 -07:00
2010-03-06 11:26:35 -08:00
2008-06-06 11:29:10 -07:00
2009-11-20 20:13:39 +01:00
2007-07-16 09:05:50 -07:00
2009-11-03 16:06:53 +01:00
2007-07-17 10:23:04 -07:00
2010-03-06 11:26:45 -08:00
2007-05-10 18:24:13 +02:00
2009-01-01 10:12:19 +10:30
2008-04-29 08:11:16 -07:00
2009-06-18 13:04:05 -07:00
2009-06-16 19:47:51 -07:00
2009-12-28 10:41:39 +01:00
2008-07-26 12:00:07 -07:00
2006-10-06 08:53:40 -07:00
2009-12-14 23:55:33 +01:00
2008-01-24 20:40:05 -08:00
2010-02-03 17:39:50 +11:00
2009-10-01 21:17:49 +02:00
2009-12-15 08:53:33 -08:00
2008-07-30 16:29:19 -07:00
2010-01-11 09:34:05 -08:00
2008-01-30 13:33:00 +01:00
2010-03-06 11:26:35 -08:00
2008-07-26 12:00:10 -07:00
2008-07-22 19:24:31 +10:00