On 5/18/23 21:40, Christoph Hellwig wrote:
Currently both requeues of commands that were already sent to the
driver and flush commands submitted from the flush state machine
share the same requeue_list struct request_queue, despite requeues
doing head insertations and flushes not. Switch to using two
separate lists instead.
insertations -> insertions. See also https://www.google.com/search?q=insertation.
@@ -1434,13 +1437,16 @@ static void blk_mq_requeue_work(struct work_struct *work)
struct request_queue *q =
container_of(work, struct request_queue, requeue_work.work);
LIST_HEAD(rq_list);
- struct request *rq, *next;
+ LIST_HEAD(flush_list);
+ struct request *rq;
spin_lock_irq(&q->requeue_lock);
list_splice_init(&q->requeue_list, &rq_list);
+ list_splice_init(&q->flush_list, &flush_list);
spin_unlock_irq(&q->requeue_lock);
"rq_list" stands for "request_list". That name is now confusing since this patch
add a second request list (flush_list).
Otherwise this patch looks good to me.
Thanks,
Bart.