block: pass in queue to inflight accounting

No functional change in this patch, just in preparation for
basing the inflight mechanism on the queue in question.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2017-06-30 21:55:08 -06:00
parent 7f5562d5ec
commit d62e26b3ff
13 changed files with 64 additions and 49 deletions

View File

@@ -396,7 +396,7 @@ static inline bool nd_iostat_start(struct bio *bio, unsigned long *start)
return false;
*start = jiffies;
generic_start_io_acct(bio_data_dir(bio),
generic_start_io_acct(disk->queue, bio_data_dir(bio),
bio_sectors(bio), &disk->part0);
return true;
}
@@ -404,7 +404,8 @@ static inline void nd_iostat_end(struct bio *bio, unsigned long start)
{
struct gendisk *disk = bio->bi_bdev->bd_disk;
generic_end_io_acct(bio_data_dir(bio), &disk->part0, start);
generic_end_io_acct(disk->queue, bio_data_dir(bio), &disk->part0,
start);
}
static inline bool is_bad_pmem(struct badblocks *bb, sector_t sector,
unsigned int len)