Skip to content

Commit

Permalink
raid5: Initialize bi_vcnt
Browse files Browse the repository at this point in the history
The patch that converted raid5 to use bio_reset() forgot to initialize
bi_vcnt.

Signed-off-by: Kent Overstreet <[email protected]>
Cc: NeilBrown <[email protected]>
Cc: [email protected]
Tested-by: Ilia Mirkin <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Kent Overstreet authored and axboe committed May 30, 2013
1 parent b02383e commit 4997b72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
bi->bi_rw |= REQ_FLUSH;

bi->bi_vcnt = 1;
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
bi->bi_io_vec[0].bv_offset = 0;
bi->bi_size = STRIPE_SIZE;
Expand Down Expand Up @@ -701,6 +702,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
else
rbi->bi_sector = (sh->sector
+ rrdev->data_offset);
rbi->bi_vcnt = 1;
rbi->bi_io_vec[0].bv_len = STRIPE_SIZE;
rbi->bi_io_vec[0].bv_offset = 0;
rbi->bi_size = STRIPE_SIZE;
Expand Down

0 comments on commit 4997b72

Please sign in to comment.