aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
authorZhao Lei <[email protected]>2015-03-03 12:38:46 +0000
committerChris Mason <[email protected]>2016-01-20 15:22:16 +0000
commitb7178a5f0372a51260cf6e74d828e315e43dfc86 (patch)
tree2791d81ab923fd046de7b8f944714b7079c72d97 /fs/btrfs/async-thread.c
parentbtrfs: Fix calculation of rbio->dbitmap's size calculation (diff)
downloadkernel-b7178a5f0372a51260cf6e74d828e315e43dfc86.tar.gz
kernel-b7178a5f0372a51260cf6e74d828e315e43dfc86.zip
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 <[email protected]> Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'fs/btrfs/async-thread.c')
0 files changed, 0 insertions, 0 deletions