On Sat, Mar 16, 2019 at 11:50:27PM -0700, Ming Lei wrote:
On Sat, Mar 16, 2019 at 12:15 AM Keith Busch [off-list ref] wrote:
quoted
On Fri, Mar 15, 2019 at 01:57:38AM -0700, Jianchao Wang wrote:
quoted
+ if (rq && rq->q == hctx->queue &&
+ rq->mq_hctx == hctx &&
+ (!iter_data->inflight ||
+ blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT))
+ return iter_data->fn(rq, iter_data->data, reserved);
There is still a window where the check may succeed, but the request is
being assigned to a completely different request_queue. The callback
then operates on a request it doesn't own.
The situation above is only related with 'none' io scheduler.
However, this patch doesn't change behavior for none given .rq[tag] is same with
.static_rq[tag], so I guess your concern may not be related with this patch.
Right, it's not new, but queue iteration wasn't exported for drivers
before this.