Josef Bacik 6719db6a23 Btrfs: fix 64 bit divide problem
This fixes a regression introduced by commit cdcb725c05fe ("Btrfs: check
if there is enough space for balancing smarter").  We can't do 64-bit
divides on 32-bit architectures.

In cases where we need to divide/multiply by 2 we should just left/right
shift respectively, and in cases where theres N number of devices use
do_div.  Also make the counters u64 to match up with rw_devices.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Acked-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-21 07:02:00 -07:00
..
2011-03-31 11:26:23 -03:00
2011-08-21 07:02:00 -07:00
2011-08-18 16:55:10 +00:00
2011-05-19 16:55:28 +09:30
2011-07-27 22:21:58 -04:00
2011-07-25 21:00:19 -07:00
2011-07-22 19:42:12 -04:00
2011-03-31 11:26:23 -03:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 13:05:28 -04:00
2011-04-14 16:06:56 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-03-21 00:16:08 -04:00
2011-07-20 20:23:19 -04:00
2011-05-26 10:01:43 -06:00
2011-07-25 20:57:11 -07:00
2011-08-03 14:25:24 -10:00
2011-03-14 09:15:28 -04:00