• Sagi Grimberg's avatar
    nvme-multipath: fix possible hang in live ns resize with ANA access · 72e3b888
    Sagi Grimberg authored
    When we revalidate paths as part of ns size change (as of commit
    e7d65803), it is possible that during the path revalidation, the
    only paths that is IO capable (i.e. optimized/non-optimized) are the
    ones that ns resize was not yet informed to the host, which will cause
    inflight requests to be requeued (as we have available paths but none
    are IO capable). These requests on the requeue list are waiting for
    someone to resubmit them at some point.
    
    The IO capable paths will eventually notify the ns resize change to the
    host, but there is nothing that will kick the requeue list to resubmit
    the queued requests.
    
    Fix this by always kicking the requeue list, and if no IO capable path
    exists, these requests will be queued again.
    
    A typical log that indicates that IOs are requeued:
    --
    nvme nvme1: creating 4 I/O queues.
    nvme nvme1: new ctrl: "testnqn1"
    nvme nvme2: creating 4 I/O queues.
    nvme nvme2: mapped 4/0/0 default/read/poll queues.
    nvme nvm...
    72e3b888
multipath.c 23.9 KB