Zhao Lei b7178a5f03 btrfs: Use unified stripe_page's index calculation
We are using different index calculation method for stripe_page in
current code:
1: (rbio->stripe_len / PAGE_CACHE_SIZE) * stripe_index + page_index
2: DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE) * stripe_index + page_index
3: DIV_ROUND_UP(rbio->stripe_len * stripe_index, PAGE_CACHE_SIZE) + page_index
...

They can get same result when stripe_len align to PAGE_CACHE_SIZE,
this is why current code can work, intruduce and use a common function
for calculation is a better choose.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
2016-01-20 07:22:16 -08:00
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-25 17:00:42 -07:00
2015-12-12 10:15:34 -08:00
2015-04-11 22:29:40 -04:00
2015-11-13 20:34:33 -05:00
2015-11-13 21:53:18 -08:00
2015-11-23 21:11:08 -05:00
2014-11-19 13:01:20 -05:00
2015-11-10 12:07:22 -08:00
2015-11-16 23:54:45 -08:00
2015-11-11 02:18:27 -05:00
2015-11-16 23:54:45 -08:00
2015-08-12 15:28:45 -05:00
2015-11-13 20:34:33 -05:00