diff options
author | NeilBrown <neilb@suse.de> | 2010-04-01 06:02:13 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-18 07:27:55 +0200 |
commit | 21a52c6d05c15f862797736393915bfa8cd40ee9 (patch) | |
tree | 44ffb633d209457979177a52132761a368fcb976 /drivers/md/raid0.c | |
parent | md: call md_stop_writes from md_stop (diff) | |
download | linux-21a52c6d05c15f862797736393915bfa8cd40ee9.tar.xz 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/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index d535f9be39f4..9f9c6b76ca7c 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -465,9 +465,8 @@ static inline int is_io_in_chunk_boundary(mddev_t *mddev, } } -static int raid0_make_request(struct request_queue *q, struct bio *bio) +static int raid0_make_request(mddev_t *mddev, struct bio *bio) { - mddev_t *mddev = q->queuedata; unsigned int chunk_sects; sector_t sector_offset; struct strip_zone *zone; @@ -495,9 +494,9 @@ static int raid0_make_request(struct request_queue *q, struct bio *bio) else bp = bio_split(bio, chunk_sects - sector_div(sector, chunk_sects)); - if (raid0_make_request(q, &bp->bio1)) + if (raid0_make_request(mddev, &bp->bio1)) generic_make_request(&bp->bio1); - if (raid0_make_request(q, &bp->bio2)) + if (raid0_make_request(mddev, &bp->bio2)) generic_make_request(&bp->bio2); bio_pair_release(bp); |