diff options
| -rw-r--r-- | block/blk-mq.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index c3621453ad87..5450cbc61f8d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
| @@ -95,18 +95,15 @@ static void blk_mq_check_inflight(struct blk_mq_hw_ctx *hctx, | |||
| 95 | { | 95 | { |
| 96 | struct mq_inflight *mi = priv; | 96 | struct mq_inflight *mi = priv; |
| 97 | 97 | ||
| 98 | if (blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT) { | 98 | /* |
| 99 | /* | 99 | * index[0] counts the specific partition that was asked for. index[1] |
| 100 | * index[0] counts the specific partition that was asked | 100 | * counts the ones that are active on the whole device, so increment |
| 101 | * for. index[1] counts the ones that are active on the | 101 | * that if mi->part is indeed a partition, and not a whole device. |
| 102 | * whole device, so increment that if mi->part is indeed | 102 | */ |
| 103 | * a partition, and not a whole device. | 103 | if (rq->part == mi->part) |
| 104 | */ | 104 | mi->inflight[0]++; |
| 105 | if (rq->part == mi->part) | 105 | if (mi->part->partno) |
| 106 | mi->inflight[0]++; | 106 | mi->inflight[1]++; |
| 107 | if (mi->part->partno) | ||
| 108 | mi->inflight[1]++; | ||
| 109 | } | ||
| 110 | } | 107 | } |
| 111 | 108 | ||
| 112 | void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part, | 109 | void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part, |
