Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Olien <dmo@osdl.org>2005-02-11 04:42:01 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-11 04:42:01 -0800
commitd007c49cc9d6d0e8542320549e74bdd8bf82ccb4 (patch)
tree5ca5f8f2ef3fb2c9a62b7451bdb29fcb09063f2c
parent5fb4869ea3b84aa748c325f2ecb7c28c82145fe4 (diff)
[PATCH] raid5 and raid6 fixes to current bk tree
This fixes the raid5 and raid6 prolems that crept in with the recent introduction of "bi_max_vecs". Since raid5/raid6 allocate their own bio's, they need to make sure that bi_max_vecs is updated along with bi_vcnt.
-rw-r--r--drivers/md/raid5.c2
-rw-r--r--drivers/md/raid6main.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 5ee4c2b553e9..470e17e60997 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -458,6 +458,7 @@ static void raid5_build_block (struct stripe_head *sh, int i)
bio_init(&dev->req);
dev->req.bi_io_vec = &dev->vec;
dev->req.bi_vcnt++;
+ dev->req.bi_max_vecs++;
dev->vec.bv_page = dev->page;
dev->vec.bv_len = STRIPE_SIZE;
dev->vec.bv_offset = 0;
@@ -1288,6 +1289,7 @@ static void handle_stripe(struct stripe_head *sh)
bi->bi_sector = sh->sector + rdev->data_offset;
bi->bi_flags = 1 << BIO_UPTODATE;
bi->bi_vcnt = 1;
+ bi->bi_max_vecs = 1;
bi->bi_idx = 0;
bi->bi_io_vec = &sh->dev[i].vec;
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index 0f82d85939e7..ac9420f77b21 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -478,6 +478,7 @@ static void raid6_build_block (struct stripe_head *sh, int i)
bio_init(&dev->req);
dev->req.bi_io_vec = &dev->vec;
dev->req.bi_vcnt++;
+ dev->req.bi_max_vecs++;
dev->vec.bv_page = dev->page;
dev->vec.bv_len = STRIPE_SIZE;
dev->vec.bv_offset = 0;
@@ -1447,6 +1448,7 @@ static void handle_stripe(struct stripe_head *sh)
bi->bi_sector = sh->sector + rdev->data_offset;
bi->bi_flags = 1 << BIO_UPTODATE;
bi->bi_vcnt = 1;
+ bi->bi_max_vecs = 1;
bi->bi_idx = 0;
bi->bi_io_vec = &sh->dev[i].vec;
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;