RE: [PATCH 9/9] [RFC] nvme: Fix a race condition
From: Steve Wise <hidden>
Date: 2016-09-28 14:23:00
Also in:
linux-nvme, linux-rdma, linux-scsi
From: Steve Wise <hidden>
Date: 2016-09-28 14:23:00
Also in:
linux-nvme, linux-rdma, linux-scsi
Hello James and Steve, I will add a comment. Please note that the above patch does not change the behavior of nvme_stop_queues() except that it causes nvme_stop_queues() to wait until any ongoing nvme_queue_rq() calls have finished. blk_resume_queue() does not affect the value of the BLK_MQ_S_STOPPED bit that has been set by blk_mq_stop_hw_queues(). All it does is to resume pending blk_queue_enter() calls and to ensure that future blk_queue_enter() calls do not block. Even after blk_resume_queue() has been called if a new request is queued queue_rq() won't be invoked because the BLK_MQ_S_STOPPED bit is still set. Patch "dm: Fix a race condition related to stopping and starting queues" realizes a similar change in the dm driver and that change has been tested extensively.
Thanks for the detailed explanation! I think your code, then, is correct as-is. And this series doesn't fix the issue I'm hitting, so I'll keep digging. :) Steve.