raid5: remove raid5_build_block

Now raid5_build_block is just called to set the
sector of r5dev, raid5_compute_blocknr can be
used directly for the purpose.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
Guoqing Jiang 2017-08-10 16:12:17 +08:00 committed by Shaohua Li
parent a72cbf83b0
commit 27a4ff8f49
1 changed files with 1 additions and 10 deletions

View File

@ -494,7 +494,6 @@ static int grow_buffers(struct stripe_head *sh, gfp_t gfp)
return 0; return 0;
} }
static void raid5_build_block(struct stripe_head *sh, int i, int previous);
static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous, static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous,
struct stripe_head *sh); struct stripe_head *sh);
@ -530,7 +529,7 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
WARN_ON(1); WARN_ON(1);
} }
dev->flags = 0; dev->flags = 0;
raid5_build_block(sh, i, previous); dev->sector = raid5_compute_blocknr(sh, i, previous);
} }
if (read_seqcount_retry(&conf->gen_lock, seq)) if (read_seqcount_retry(&conf->gen_lock, seq))
goto retry; goto retry;
@ -2662,14 +2661,6 @@ static void raid5_end_write_request(struct bio *bi)
raid5_release_stripe(sh->batch_head); raid5_release_stripe(sh->batch_head);
} }
static void raid5_build_block(struct stripe_head *sh, int i, int previous)
{
struct r5dev *dev = &sh->dev[i];
dev->flags = 0;
dev->sector = raid5_compute_blocknr(sh, i, previous);
}
static void raid5_error(struct mddev *mddev, struct md_rdev *rdev) static void raid5_error(struct mddev *mddev, struct md_rdev *rdev)
{ {
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];