diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-08-10 04:12:17 -0400 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-08-25 13:21:47 -0400 |
commit | 27a4ff8f49a9b912be76f36f7e198824cf0aecd9 (patch) | |
tree | ac844762041938e63c5975fadc483c877a8df8f7 | |
parent | a72cbf83b0cb2368568d4e78cf1687079aad4d25 (diff) |
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>
-rw-r--r-- | drivers/md/raid5.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index e13a8ce7f589..6af57c6c0533 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -494,7 +494,6 @@ static int grow_buffers(struct stripe_head *sh, gfp_t gfp) | |||
494 | return 0; | 494 | return 0; |
495 | } | 495 | } |
496 | 496 | ||
497 | static void raid5_build_block(struct stripe_head *sh, int i, int previous); | ||
498 | static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous, | 497 | static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous, |
499 | struct stripe_head *sh); | 498 | struct stripe_head *sh); |
500 | 499 | ||
@@ -530,7 +529,7 @@ retry: | |||
530 | WARN_ON(1); | 529 | WARN_ON(1); |
531 | } | 530 | } |
532 | dev->flags = 0; | 531 | dev->flags = 0; |
533 | raid5_build_block(sh, i, previous); | 532 | dev->sector = raid5_compute_blocknr(sh, i, previous); |
534 | } | 533 | } |
535 | if (read_seqcount_retry(&conf->gen_lock, seq)) | 534 | if (read_seqcount_retry(&conf->gen_lock, seq)) |
536 | goto retry; | 535 | goto retry; |
@@ -2662,14 +2661,6 @@ static void raid5_end_write_request(struct bio *bi) | |||
2662 | raid5_release_stripe(sh->batch_head); | 2661 | raid5_release_stripe(sh->batch_head); |
2663 | } | 2662 | } |
2664 | 2663 | ||
2665 | static void raid5_build_block(struct stripe_head *sh, int i, int previous) | ||
2666 | { | ||
2667 | struct r5dev *dev = &sh->dev[i]; | ||
2668 | |||
2669 | dev->flags = 0; | ||
2670 | dev->sector = raid5_compute_blocknr(sh, i, previous); | ||
2671 | } | ||
2672 | |||
2673 | static void raid5_error(struct mddev *mddev, struct md_rdev *rdev) | 2664 | static void raid5_error(struct mddev *mddev, struct md_rdev *rdev) |
2674 | { | 2665 | { |
2675 | char b[BDEVNAME_SIZE]; | 2666 | char b[BDEVNAME_SIZE]; |