Is nvme_clear_queue() correct?

Wenbo Wang wenbo.wang at memblaze.com
Mon Feb 1 08:36:00 PST 2016


Hi,

nvme_clear_queue() is invoked by nvme_dev_disable. It finds all inuse tags and cancels the corresponding requests. However, it seems to have some issues:

1. Some requests might be in q->request_list, ctx->rq_list or hctx->dispatch. nvme_clear_queue does not remove them from these lists, it may cause problems.
2. Some blk_mq_run_hw_queue might be running concurrently with nvme_dev_disable, they are not aware that the requests have been canceled.

Looking forward to your comments. Thanks.


More information about the Linux-nvme mailing list