X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fgenhd.c;h=f878da09d658043c6ec5acdef560c68e7731604f;hb=bea28a1975c5643c19c952af77f3ace1f088d802;hp=96a66f67172045d571be9fe18248dbefc99766ef;hpb=7c5cac1bc7170bfc726a69eb64947c55658d16ad;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);