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-07-26 16:49:47 -07:00
2008-09-25 11:04:06 -04:00
2011-08-21 07:02:00 -07:00
2011-08-18 10:38:03 -04:00
2011-05-26 17:52:15 -04:00
2010-12-22 23:15:47 +08:00
2011-06-17 14:54:18 -04:00
2011-05-28 07:00:39 -04:00
2011-08-16 21:09:15 -04:00