ANDROID: block: Warn if a zoned write is about to be reordered

Make it easier to debug out-of-order zoned writes.

Bug: 275581839
Change-Id: I5d1f1cd47ff1b4c10788edeebba5e80bd82b2bf3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche
2023-04-13 12:50:44 -07:00
committed by Treehugger Robot
parent 5d90f7cbaf
commit 88819308f5

View File

@@ -1876,6 +1876,8 @@ void blk_mq_request_bypass_insert(struct request *rq, bool at_head,
{
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
WARN_ON_ONCE(rq->q->elevator && blk_rq_is_seq_zoned_write(rq));
spin_lock(&hctx->lock);
if (at_head)
list_add(&rq->queuelist, &hctx->dispatch);