diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-12-01 06:06:42 (GMT) |
---|---|---|
committer | Li Zefan <lizf@cn.fujitsu.com> | 2012-01-11 02:26:46 (GMT) |
commit | ec9ef7a13be4dcce964c8503e8999087945e5b9e (patch) | |
tree | afd97976c76c45fca7b659f8d81cbcd4995d2a7e /fs/btrfs/free-space-cache.c | |
parent | de11cc12df17337979e0929d2831887432f236ca (diff) | |
download | linux-fsl-qoriq-ec9ef7a13be4dcce964c8503e8999087945e5b9e.tar.xz |
Btrfs: simplfy calculation of stripe length for discard operation
For btrfs raid, while discarding a range of space, we'll need to know
the start offset and length to discard for each device, and it's done
in btrfs_map_block().
However the calculation is a bit complex for raid0 and raid10, so I
reimplement it based on a fact that:
dev1 dev2 dev3 (raid0)
-----------------------------------
s0 s3 s6 s1 s4 s7 s2 s5
Each device has (total_stripes / nr_dev) stripes, or plus one.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
0 files changed, 0 insertions, 0 deletions