Re: [PATCH v1] block/mq-deadline: hold elevator_lock in debugfs next_rq show

From: Xixin Liu

Date: Mon Jul 27 2026 - 06:48:41 EST


Hi Bart,

To add to my previous reply:

This part needs dd->lock, for example:

per_prio = &dd->per_prio[prio];
rq = deadline_from_pos(...);

because both the per-priority state selection and the subsequent
deadline_from_pos() walk access mq-deadline internal state that is
protected by dd->lock.

Separately, q->elevator_lock is still needed earlier to stabilize
q->elevator and obtain e->elevator_data safely during an elevator
switch.

Thanks,
Xixin