Skip to content

Commit 4997b72

Browse files
Kent Overstreetaxboe
authored andcommitted
raid5: Initialize bi_vcnt
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]>
1 parent b02383e commit 4997b72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/md/raid5.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
664664
if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
665665
bi->bi_rw |= REQ_FLUSH;
666666

667+
bi->bi_vcnt = 1;
667668
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
668669
bi->bi_io_vec[0].bv_offset = 0;
669670
bi->bi_size = STRIPE_SIZE;
@@ -701,6 +702,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
701702
else
702703
rbi->bi_sector = (sh->sector
703704
+ rrdev->data_offset);
705+
rbi->bi_vcnt = 1;
704706
rbi->bi_io_vec[0].bv_len = STRIPE_SIZE;
705707
rbi->bi_io_vec[0].bv_offset = 0;
706708
rbi->bi_size = STRIPE_SIZE;

0 commit comments

Comments
 (0)