Loading fs/btrfs/scrub.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -2318,7 +2318,7 @@ static inline void __scrub_mark_bitmap(struct scrub_parity *sparity, unsigned long *bitmap, unsigned long *bitmap, u64 start, u64 len) u64 start, u64 len) { { int offset; u32 offset; int nsectors; int nsectors; int sectorsize = sparity->sctx->dev_root->sectorsize; int sectorsize = sparity->sctx->dev_root->sectorsize; Loading Loading @@ -2611,8 +2611,8 @@ static int get_raid56_logic_offset(u64 physical, int num, int j = 0; int j = 0; u64 stripe_nr; u64 stripe_nr; u64 last_offset; u64 last_offset; int stripe_index; u32 stripe_index; int rot; u32 rot; last_offset = (physical - map->stripes[num].physical) * last_offset = (physical - map->stripes[num].physical) * nr_data_stripes(map); nr_data_stripes(map); Loading fs/btrfs/volumes.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -4953,7 +4953,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, u64 stripe_nr_orig; u64 stripe_nr_orig; u64 stripe_nr_end; u64 stripe_nr_end; u64 stripe_len; u64 stripe_len; int stripe_index; u32 stripe_index; int i; int i; int ret = 0; int ret = 0; int num_stripes; int num_stripes; Loading Loading @@ -5171,7 +5171,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, } } } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { int factor = map->num_stripes / map->sub_stripes; u32 factor = map->num_stripes / map->sub_stripes; stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); stripe_index *= map->sub_stripes; stripe_index *= map->sub_stripes; Loading Loading @@ -5262,7 +5262,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || mirror_num > 1)) { mirror_num > 1)) { u64 tmp; u64 tmp; int i, rot; int i; unsigned rot; bbio->raid_map = (u64 *)((void *)bbio->stripes + bbio->raid_map = (u64 *)((void *)bbio->stripes + sizeof(struct btrfs_bio_stripe) * sizeof(struct btrfs_bio_stripe) * Loading @@ -5285,8 +5286,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, } } if (rw & REQ_DISCARD) { if (rw & REQ_DISCARD) { int factor = 0; u32 factor = 0; int sub_stripes = 0; u32 sub_stripes = 0; u64 stripes_per_dev = 0; u64 stripes_per_dev = 0; u32 remaining_stripes = 0; u32 remaining_stripes = 0; u32 last_stripe = 0; u32 last_stripe = 0; Loading Loading
fs/btrfs/scrub.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -2318,7 +2318,7 @@ static inline void __scrub_mark_bitmap(struct scrub_parity *sparity, unsigned long *bitmap, unsigned long *bitmap, u64 start, u64 len) u64 start, u64 len) { { int offset; u32 offset; int nsectors; int nsectors; int sectorsize = sparity->sctx->dev_root->sectorsize; int sectorsize = sparity->sctx->dev_root->sectorsize; Loading Loading @@ -2611,8 +2611,8 @@ static int get_raid56_logic_offset(u64 physical, int num, int j = 0; int j = 0; u64 stripe_nr; u64 stripe_nr; u64 last_offset; u64 last_offset; int stripe_index; u32 stripe_index; int rot; u32 rot; last_offset = (physical - map->stripes[num].physical) * last_offset = (physical - map->stripes[num].physical) * nr_data_stripes(map); nr_data_stripes(map); Loading
fs/btrfs/volumes.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -4953,7 +4953,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, u64 stripe_nr_orig; u64 stripe_nr_orig; u64 stripe_nr_end; u64 stripe_nr_end; u64 stripe_len; u64 stripe_len; int stripe_index; u32 stripe_index; int i; int i; int ret = 0; int ret = 0; int num_stripes; int num_stripes; Loading Loading @@ -5171,7 +5171,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, } } } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { int factor = map->num_stripes / map->sub_stripes; u32 factor = map->num_stripes / map->sub_stripes; stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); stripe_nr = div_u64_rem(stripe_nr, factor, &stripe_index); stripe_index *= map->sub_stripes; stripe_index *= map->sub_stripes; Loading Loading @@ -5262,7 +5262,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || mirror_num > 1)) { mirror_num > 1)) { u64 tmp; u64 tmp; int i, rot; int i; unsigned rot; bbio->raid_map = (u64 *)((void *)bbio->stripes + bbio->raid_map = (u64 *)((void *)bbio->stripes + sizeof(struct btrfs_bio_stripe) * sizeof(struct btrfs_bio_stripe) * Loading @@ -5285,8 +5286,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, } } if (rw & REQ_DISCARD) { if (rw & REQ_DISCARD) { int factor = 0; u32 factor = 0; int sub_stripes = 0; u32 sub_stripes = 0; u64 stripes_per_dev = 0; u64 stripes_per_dev = 0; u32 remaining_stripes = 0; u32 remaining_stripes = 0; u32 last_stripe = 0; u32 last_stripe = 0; Loading