summaryrefslogtreecommitdiff
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-10-07 12:00:50 +1100
committerNeilBrown <neilb@suse.de>2010-10-07 12:00:50 +1100
commitdb8d9d3591f77cc6b66248b2cdfa1c43deee5ec9 (patch)
tree2b8e727bc5f74883620934d3334323ce501c853e /drivers/md/raid1.c
parent7571ae887d3b96d8e7ce63d43828866c6a91cdc6 (diff)
md/raid1: minor bio initialisation improvements.
When performing a resync we pre-allocate some bios and repeatedly use them. This requires us to re-initialise them each time. One field (bi_comp_cpu) and some flags weren't being initiaised reliably. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index fba4d2feaeb..0b830bbe1d8 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1839,7 +1839,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
/* take from bio_init */
bio->bi_next = NULL;
+ bio->bi_flags &= ~(BIO_POOL_MASK-1);
bio->bi_flags |= 1 << BIO_UPTODATE;
+ bio->bi_comp_cpu = -1;
bio->bi_rw = READ;
bio->bi_vcnt = 0;
bio->bi_idx = 0;