diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/scrub.c | 6 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index c21581e0be7a..0d1414659bc1 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -2318,7 +2318,7 @@ static inline void __scrub_mark_bitmap(struct scrub_parity *sparity, | |||
2318 | unsigned long *bitmap, | 2318 | unsigned long *bitmap, |
2319 | u64 start, u64 len) | 2319 | u64 start, u64 len) |
2320 | { | 2320 | { |
2321 | int offset; | 2321 | u32 offset; |
2322 | int nsectors; | 2322 | int nsectors; |
2323 | int sectorsize = sparity->sctx->dev_root->sectorsize; | 2323 | int sectorsize = sparity->sctx->dev_root->sectorsize; |
2324 | 2324 | ||
@@ -2611,8 +2611,8 @@ static int get_raid56_logic_offset(u64 physical, int num, | |||
2611 | int j = 0; | 2611 | int j = 0; |
2612 | u64 stripe_nr; | 2612 | u64 stripe_nr; |
2613 | u64 last_offset; | 2613 | u64 last_offset; |
2614 | int stripe_index; | 2614 | u32 stripe_index; |
2615 | int rot; | 2615 | u32 rot; |
2616 | 2616 | ||
2617 | last_offset = (physical - map->stripes[num].physical) * | 2617 | last_offset = (physical - map->stripes[num].physical) * |
2618 | nr_data_stripes(map); | 2618 | nr_data_stripes(map); |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index bf38ed09810a..3df83539f532 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -4953,7 +4953,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, | |||
4953 | u64 stripe_nr_orig; | 4953 | u64 stripe_nr_orig; |
4954 | u64 stripe_nr_end; | 4954 | u64 stripe_nr_end; |
4955 | u64 stripe_len; | 4955 | u64 stripe_len; |
4956 | int stripe_index; | 4956 | u32 stripe_index; |
4957 | int i; | 4957 | int i; |
4958 | int ret = 0; | 4958 | int ret = 0; |
4959 | int num_stripes; | 4959 | int num_stripes; |
@@ -5171,7 +5171,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, | |||
5171 | } | 5171 | } |
5172 | 5172 | ||
5173 | } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { | 5173 | } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { |
5174 | int factor = map->num_stripes / map->sub_stripes; | 5174 | u32 factor = map->num_stripes / map->sub_stripes; |
5175 | 5175 | ||
5176 | stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); | 5176 | stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); |
5177 | stripe_index *= map->sub_stripes; | 5177 | stripe_index *= map->sub_stripes; |
@@ -5262,7 +5262,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, | |||
5262 | need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || | 5262 | need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || |
5263 | mirror_num > 1)) { | 5263 | mirror_num > 1)) { |
5264 | u64 tmp; | 5264 | u64 tmp; |
5265 | int i, rot; | 5265 | int i; |
5266 | unsigned rot; | ||
5266 | 5267 | ||
5267 | bbio->raid_map = (u64 *)((void *)bbio->stripes + | 5268 | bbio->raid_map = (u64 *)((void *)bbio->stripes + |
5268 | sizeof(struct btrfs_bio_stripe) * | 5269 | sizeof(struct btrfs_bio_stripe) * |
@@ -5285,8 +5286,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, | |||
5285 | } | 5286 | } |
5286 | 5287 | ||
5287 | if (rw & REQ_DISCARD) { | 5288 | if (rw & REQ_DISCARD) { |
5288 | int factor = 0; | 5289 | u32 factor = 0; |
5289 | int sub_stripes = 0; | 5290 | u32 sub_stripes = 0; |
5290 | u64 stripes_per_dev = 0; | 5291 | u64 stripes_per_dev = 0; |
5291 | u32 remaining_stripes = 0; | 5292 | u32 remaining_stripes = 0; |
5292 | u32 last_stripe = 0; | 5293 | u32 last_stripe = 0; |