block: don't call part_{inc,dec}_in_flight for blk-mq devices
part_inc_in_flight and part_dec_in_flight are no-ops for blk-mq queues, so remove the calls in purely blk-mq callers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b2f609e191
commit
76268f3ac0
@ -1412,7 +1412,6 @@ void blk_account_io_done(struct request *req, u64 now)
|
|||||||
update_io_ticks(part, jiffies, true);
|
update_io_ticks(part, jiffies, true);
|
||||||
part_stat_inc(part, ios[sgrp]);
|
part_stat_inc(part, ios[sgrp]);
|
||||||
part_stat_add(part, nsecs[sgrp], now - req->start_time_ns);
|
part_stat_add(part, nsecs[sgrp], now - req->start_time_ns);
|
||||||
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
|
||||||
|
|
||||||
hd_struct_put(part);
|
hd_struct_put(part);
|
||||||
part_stat_unlock();
|
part_stat_unlock();
|
||||||
@ -1421,25 +1420,15 @@ void blk_account_io_done(struct request *req, u64 now)
|
|||||||
|
|
||||||
void blk_account_io_start(struct request *rq, bool new_io)
|
void blk_account_io_start(struct request *rq, bool new_io)
|
||||||
{
|
{
|
||||||
struct hd_struct *part;
|
|
||||||
int rw = rq_data_dir(rq);
|
|
||||||
|
|
||||||
if (!blk_do_io_stat(rq))
|
if (!blk_do_io_stat(rq))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
part_stat_lock();
|
part_stat_lock();
|
||||||
|
if (!new_io)
|
||||||
if (!new_io) {
|
part_stat_inc(rq->part, merges[rq_data_dir(rq)]);
|
||||||
part = rq->part;
|
else
|
||||||
part_stat_inc(part, merges[rw]);
|
rq->part = disk_map_sector_rcu(rq->rq_disk, blk_rq_pos(rq));
|
||||||
} else {
|
update_io_ticks(rq->part, jiffies, false);
|
||||||
part = disk_map_sector_rcu(rq->rq_disk, blk_rq_pos(rq));
|
|
||||||
part_inc_in_flight(rq->q, part, rw);
|
|
||||||
rq->part = part;
|
|
||||||
}
|
|
||||||
|
|
||||||
update_io_ticks(part, jiffies, false);
|
|
||||||
|
|
||||||
part_stat_unlock();
|
part_stat_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,8 +677,6 @@ static void blk_account_io_merge(struct request *req)
|
|||||||
part_stat_lock();
|
part_stat_lock();
|
||||||
part = req->part;
|
part = req->part;
|
||||||
|
|
||||||
part_dec_in_flight(req->q, part, rq_data_dir(req));
|
|
||||||
|
|
||||||
hd_struct_put(part);
|
hd_struct_put(part);
|
||||||
part_stat_unlock();
|
part_stat_unlock();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user