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>
This commit is contained in:
@@ -3753,9 +3753,8 @@ static int bio_fits_rdev(struct bio *bi)
|
||||
}
|
||||
|
||||
|
||||
static int chunk_aligned_read(struct request_queue *q, struct bio * raid_bio)
|
||||
static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio)
|
||||
{
|
||||
mddev_t *mddev = q->queuedata;
|
||||
raid5_conf_t *conf = mddev->private;
|
||||
int dd_idx;
|
||||
struct bio* align_bi;
|
||||
@@ -3870,9 +3869,8 @@ static struct stripe_head *__get_priority_stripe(raid5_conf_t *conf)
|
||||
return sh;
|
||||
}
|
||||
|
||||
static int make_request(struct request_queue *q, struct bio * bi)
|
||||
static int make_request(mddev_t *mddev, struct bio * bi)
|
||||
{
|
||||
mddev_t *mddev = q->queuedata;
|
||||
raid5_conf_t *conf = mddev->private;
|
||||
int dd_idx;
|
||||
sector_t new_sector;
|
||||
@@ -3896,7 +3894,7 @@ static int make_request(struct request_queue *q, struct bio * bi)
|
||||
|
||||
if (rw == READ &&
|
||||
mddev->reshape_position == MaxSector &&
|
||||
chunk_aligned_read(q,bi))
|
||||
chunk_aligned_read(mddev,bi))
|
||||
return 0;
|
||||
|
||||
logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
|
||||
|
Reference in New Issue
Block a user