block-5.7-2020-05-29
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl7RbAcQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpjytD/9ptRsnVCTj2H7dFFcGzMaN6OUBGJqSpCHm 5XnZEcdhKPCHl8iDxlPBKT++X8CQd0vW6fBHO1UAfZvbDsyRR3/oGJ6kO9k/4e9d UpG1N3lpebnvbonoXamriUs94J+r5FQ45wRRbO6eARMzpcg1Cf1EjGSz/7WAeYgV zW/wv9cDPwCK2sS/fAeLW7kQNkn65nxUehyNdwlYjv1FuYDrQG2etEgVMFb2VLSz QkYd5ftZHjNNLUCi/XTaO+j0zAcVRFPo2RZXkyk1iuYzcVc7E/FtMoQp1Bx5plbA 0GKldQkoG6KOCh1D5WRX5vPVDmAR9Xs/XF8yDo/WohqpVppMVWj4cyvqe2ae/OhQ 5xlz2JWhFRdUxUmADMHibeQMmmd6QNHvuzjR9HUnAzKW0FPJLEzETcWGRDTDfsN1 XRT3QbvcZ0Ks8ewVhTXJrolkR9oAtzb/P1z0Xq4QHbqSUMBC2qaJWYVvjM5ZUC2U 53YDXWa+SAb/G/loJVmr8qPcGfQtjWPOBc5/kz+PifjgmzR8eTgOEGvQFhsjJHCw HSM9X41boathhJt1nt/YLYkCA1zgvXjb/F+tTDsu4aau1Skhxd1foDQML5+oGlKA eS2hF4V3pyZ0r3X17Y7ykiKpBAHx5cqksFd44lfl4772WiQIM/rrEHgOFhMjh6Bi mG4Sl6vOvA== =GfOk -----END PGP SIGNATURE----- Merge tag 'block-5.7-2020-05-29' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two small fixes: - Revert a block change that mixed up the return values for non-mq devices - NVMe poll race fix" * tag 'block-5.7-2020-05-29' of git://git.kernel.dk/linux-block: Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT" nvme-pci: avoid race between nvme_reap_pending_cqes() and nvme_poll()
This commit is contained in:
Коммит
75574f1212
|
@ -891,14 +891,11 @@ generic_make_request_checks(struct bio *bio)
|
|||
}
|
||||
|
||||
/*
|
||||
* Non-mq queues do not honor REQ_NOWAIT, so complete a bio
|
||||
* with BLK_STS_AGAIN status in order to catch -EAGAIN and
|
||||
* to give a chance to the caller to repeat request gracefully.
|
||||
* For a REQ_NOWAIT based request, return -EOPNOTSUPP
|
||||
* if queue is not a request based queue.
|
||||
*/
|
||||
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) {
|
||||
status = BLK_STS_AGAIN;
|
||||
goto end_io;
|
||||
}
|
||||
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q))
|
||||
goto not_supported;
|
||||
|
||||
if (should_fail_bio(bio))
|
||||
goto end_io;
|
||||
|
|
|
@ -1382,16 +1382,19 @@ static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown)
|
|||
|
||||
/*
|
||||
* Called only on a device that has been disabled and after all other threads
|
||||
* that can check this device's completion queues have synced. This is the
|
||||
* last chance for the driver to see a natural completion before
|
||||
* nvme_cancel_request() terminates all incomplete requests.
|
||||
* that can check this device's completion queues have synced, except
|
||||
* nvme_poll(). This is the last chance for the driver to see a natural
|
||||
* completion before nvme_cancel_request() terminates all incomplete requests.
|
||||
*/
|
||||
static void nvme_reap_pending_cqes(struct nvme_dev *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = dev->ctrl.queue_count - 1; i > 0; i--)
|
||||
for (i = dev->ctrl.queue_count - 1; i > 0; i--) {
|
||||
spin_lock(&dev->queues[i].cq_poll_lock);
|
||||
nvme_process_cq(&dev->queues[i]);
|
||||
spin_unlock(&dev->queues[i].cq_poll_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues,
|
||||
|
|
Загрузка…
Ссылка в новой задаче