On 08/03/2017 03:25 PM, Bart Van Assche wrote: > On Thu, 2017-08-03 at 14:01 -0600, Jens Axboe wrote: >> +static void blk_mq_check_inflight(struct blk_mq_hw_ctx *hctx, >> + struct request *rq, void *priv, >> + bool reserved) >> +{ >> + struct mq_inflight *mi = priv; >> + >> + if (rq->part == mi->part) >> + mi->inflight++; >> +} >> [ ... ] >> -static inline void part_inc_in_flight(struct request_queue *q, >> - struct hd_struct *part, int rw) >> -{ >> - atomic_inc(&part->in_flight[rw]); >> - if (part->partno) >> - atomic_inc(&part_to_disk(part)->part0.in_flight[rw]); >> -} > > Hello Jens, > > The existing part_inc_in_flight() code includes all requests in the in_flight > statistics for part0 but the new code in blk_mq_check_inflight() not. Is that > on purpose? Should the rq->part == mi->part check perhaps be skipped if > mi->part represents part0? The existing code increments always for the partition in question, and for the root if it's a partition. I'll take a look at that logic, and ensure it's all correct. -- Jens Axboe