X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fgenhd.c;h=f878da09d658043c6ec5acdef560c68e7731604f;hb=5c9c0830b548fb0d35a73081cb1c32c51da6e87a;hp=96a66f67172045d571be9fe18248dbefc99766ef;hpb=c0208a33cbc428f66b446f5dd16c91fb76aaab88;p=mirror_ubuntu-bionic-kernel.git diff --git a/block/genhd.c b/block/genhd.c index 96a66f671720..f878da09d658 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -82,6 +82,18 @@ void part_in_flight(struct request_queue *q, struct hd_struct *part, } } +void part_in_flight_rw(struct request_queue *q, struct hd_struct *part, + unsigned int inflight[2]) +{ + if (q->mq_ops) { + blk_mq_in_flight_rw(q, part, inflight); + return; + } + + inflight[0] = atomic_read(&part->in_flight[0]); + inflight[1] = atomic_read(&part->in_flight[1]); +} + struct hd_struct *__disk_get_part(struct gendisk *disk, int partno) { struct disk_part_tbl *ptbl = rcu_dereference(disk->part_tbl);