• Ming Lei's avatar
    nvme-pci: fix nvme_setup_irqs() · c45b1fa2
    Ming Lei authored
    When -ENOSPC is returned from pci_alloc_irq_vectors_affinity(),
    we still try to allocate multiple irq vectors again, so irq queues
    covers the admin queue actually. But we don't consider that, then
    number of the allocated irq vector may be same with sum of
    io_queues[HCTX_TYPE_DEFAULT] and io_queues[HCTX_TYPE_READ], this way
    is obviously wrong, and finally breaks nvme_pci_map_queues(), and
    warning from pci_irq_get_affinity() is triggered.
    
    IRQ queues should cover admin queues, this patch makes this
    point explicitely in nvme_calc_io_queues().
    
    We got severl boot failure internal report on aarch64, so please
    consider to fix it in v4.20.
    
    Fixes: 6451fe73 ("nvme: fix irq vs io_queue calculations")
    Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
    Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
    Tested-by: default avatarfin4478 <fin4478@hotmail.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c45b1fa2
pci.c 77.1 KB