• K
    nvme: Complete all stuck requests · 302ad8cc
    Keith Busch 提交于
    If the nvme driver is shutting down its controller, the drievr will not
    start the queues up again, preventing blk-mq's hot CPU notifier from
    making forward progress.
    
    To fix that, this patch starts a request_queue freeze when the driver
    resets a controller so no new requests may enter. The driver will wait
    for frozen after IO queues are restarted to ensure the queue reference
    can be reinitialized when nvme requests to unfreeze the queues.
    
    If the driver is doing a safe shutdown, the driver will wait for the
    controller to successfully complete all inflight requests so that we
    don't unnecessarily fail them. Once the controller has been disabled,
    the queues will be restarted to force remaining entered requests to end
    in failure so that blk-mq's hot cpu notifier may progress.
    Signed-off-by: NKeith Busch <keith.busch@intel.com>
    Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    302ad8cc
nvme.h 10.2 KB