summaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-04-01 15:02:13 +1100
committerNeilBrown <neilb@suse.de>2010-05-18 15:27:55 +1000
commit21a52c6d05c15f862797736393915bfa8cd40ee9 (patch)
tree44ffb633d209457979177a52132761a368fcb976 /drivers/md/linear.c
parentcca9cf90c504d98644ace52c474770970729f0eb (diff)
downloadlinux-21a52c6d05c15f862797736393915bfa8cd40ee9.tar.gz
linux-21a52c6d05c15f862797736393915bfa8cd40ee9.tar.bz2
linux-21a52c6d05c15f862797736393915bfa8cd40ee9.zip
md: pass mddev to make_request functions rather than request_queue
We used to pass the personality make_request function direct to the block layer so the first argument had to be a queue. But now we have the intermediary md_make_request so it makes at lot more sense to pass a struct mddev_s. It makes it possible to have an mddev without its own queue too. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 3048c1704f40..3204a2263f21 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -286,9 +286,8 @@ static int linear_stop (mddev_t *mddev)
return 0;
}
-static int linear_make_request (struct request_queue *q, struct bio *bio)
+static int linear_make_request (mddev_t *mddev, struct bio *bio)
{
- mddev_t *mddev = q->queuedata;
dev_info_t *tmp_dev;
sector_t start_sector;
@@ -328,9 +327,9 @@ static int linear_make_request (struct request_queue *q, struct bio *bio)
bp = bio_split(bio, end_sector - bio->bi_sector);
- if (linear_make_request(q, &bp->bio1))
+ if (linear_make_request(mddev, &bp->bio1))
generic_make_request(&bp->bio1);
- if (linear_make_request(q, &bp->bio2))
+ if (linear_make_request(mddev, &bp->bio2))
generic_make_request(&bp->bio2);
bio_pair_release(bp);
return 0;