nvme fixes for Linux 6.5
- Reduce spamming kernel logs on repeated controller updates (Breno) - Improved struct packing (Christophe JAILLET) - Misspelled command name in error logging (Damien) - Failover fix for temporary frozen queue (Sagi) - Reset error handling fixes (Keith) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE3Fbyvv+648XNRdHTPe3zGtjzRgkFAmSfHiQACgkQPe3zGtjz RglOEg/+IBogV9vdGGaExlt6jKeVCLeq/dvBjTtq9adHFYnyF6s9B39GDW9QuhPv wGvE8FsWOVcLBVIvwS9ZiPMnjwyOD5DGQ7kqBVRiMT65JOA7sMHz22H432CjcOTM 54m5ezdeAwdxMJrbElf6cpCQXxdpu6rlQrcpKPw5F6Gl5PWV1sG4U8c5YGsUQ+Jj KTjhQIIcvwWRNWfru/6CcZ3b6YxixtuGbCXnls2WhVPN1e8DIgVvQfy7eMLKYT4w 3OrFe64nTEPSX1aT4FlV+AZN2icB8GJlhHUjIH4kjdquR49ZpItvVO38DdilJ8SU 2cFfN1rLE9o4Kwozlxi0VgUe/TUwGL3QLlrQRvQMEdG80Y/pe4vwD0n8N/6btZLo EJcK4spSdsAmdAx+RTzizl+IhgV2cBWmwLfPv9qZmBODPIEHwVLXky5iVkFqYifk jm6PIUYur5RLZsYlW6SiZY1NBc62cigRbtC5Cu7XuxFHXZFC2MW7KWpyAHYSQxJJ k8MQr6vvlBLypzAZzZCm9zC3FlMvaFNM7Q4cq52s9vaL4lxQ5zgQ5SjGZnXp2Ow/ K4PU7mo0BHSoKwfy42uYnWm42hinFSVKROEZo/E7+RoUIjl8S6uAeUyBnWYYGqsv g0VtZCUbSAlM8aP3ffi8UZCm84Po3zdB0s62eKNC5FG/CFtveI4= =ZzGx -----END PGP SIGNATURE----- Merge tag 'nvme-6.5-2023-06-30' of git://git.infradead.org/nvme into block-6.5 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.5 - Reduce spamming kernel logs on repeated controller updates (Breno) - Improved struct packing (Christophe JAILLET) - Misspelled command name in error logging (Damien) - Failover fix for temporary frozen queue (Sagi) - Reset error handling fixes (Keith)" * tag 'nvme-6.5-2023-06-30' of git://git.infradead.org/nvme: nvme: disable controller on reset state failure nvme: sync timeout work on failed reset nvme: ensure unquiesce on teardown nvme-mpath: fix I/O failure with EAGAIN when failing over I/O nvme: host: fix command name spelling nvmet: Reorder fields in 'struct nvmet_ns' nvme: Print capabilities changes just once
This commit is contained in:
commit
6e34e784e7
|
@ -12,7 +12,7 @@ static const char * const nvme_ops[] = {
|
|||
[nvme_cmd_read] = "Read",
|
||||
[nvme_cmd_write_uncor] = "Write Uncorrectable",
|
||||
[nvme_cmd_compare] = "Compare",
|
||||
[nvme_cmd_write_zeroes] = "Write Zeros",
|
||||
[nvme_cmd_write_zeroes] = "Write Zeroes",
|
||||
[nvme_cmd_dsm] = "Dataset Management",
|
||||
[nvme_cmd_verify] = "Verify",
|
||||
[nvme_cmd_resv_register] = "Reservation Register",
|
||||
|
|
|
@ -1134,8 +1134,11 @@ void nvme_passthru_end(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u32 effects,
|
|||
mutex_unlock(&ctrl->scan_lock);
|
||||
}
|
||||
if (effects & NVME_CMD_EFFECTS_CCC) {
|
||||
dev_info(ctrl->device,
|
||||
if (!test_and_set_bit(NVME_CTRL_DIRTY_CAPABILITY,
|
||||
&ctrl->flags)) {
|
||||
dev_info(ctrl->device,
|
||||
"controller capabilities changed, reset may be required to take effect.\n");
|
||||
}
|
||||
}
|
||||
if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) {
|
||||
nvme_queue_scan(ctrl);
|
||||
|
@ -3324,6 +3327,7 @@ int nvme_init_ctrl_finish(struct nvme_ctrl *ctrl, bool was_suspended)
|
|||
return ret;
|
||||
}
|
||||
|
||||
clear_bit(NVME_CTRL_DIRTY_CAPABILITY, &ctrl->flags);
|
||||
ctrl->identified = true;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -106,6 +106,14 @@ void nvme_failover_req(struct request *req)
|
|||
bio->bi_opf &= ~REQ_POLLED;
|
||||
bio->bi_cookie = BLK_QC_T_NONE;
|
||||
}
|
||||
/*
|
||||
* The alternate request queue that we may end up submitting
|
||||
* the bio to may be frozen temporarily, in this case REQ_NOWAIT
|
||||
* will fail the I/O immediately with EAGAIN to the issuer.
|
||||
* We are not in the issuer context which cannot block. Clear
|
||||
* the flag to avoid spurious EAGAIN I/O failures.
|
||||
*/
|
||||
bio->bi_opf &= ~REQ_NOWAIT;
|
||||
}
|
||||
blk_steal_bios(&ns->head->requeue_list, req);
|
||||
spin_unlock_irqrestore(&ns->head->requeue_lock, flags);
|
||||
|
|
|
@ -248,6 +248,7 @@ enum nvme_ctrl_flags {
|
|||
NVME_CTRL_STARTED_ONCE = 2,
|
||||
NVME_CTRL_STOPPED = 3,
|
||||
NVME_CTRL_SKIP_ID_CNS_CS = 4,
|
||||
NVME_CTRL_DIRTY_CAPABILITY = 5,
|
||||
};
|
||||
|
||||
struct nvme_ctrl {
|
||||
|
|
|
@ -2690,7 +2690,8 @@ static void nvme_reset_work(struct work_struct *work)
|
|||
if (dev->ctrl.state != NVME_CTRL_RESETTING) {
|
||||
dev_warn(dev->ctrl.device, "ctrl state %d is not RESETTING\n",
|
||||
dev->ctrl.state);
|
||||
return;
|
||||
result = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2777,7 +2778,9 @@ static void nvme_reset_work(struct work_struct *work)
|
|||
result);
|
||||
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING);
|
||||
nvme_dev_disable(dev, true);
|
||||
nvme_sync_queues(&dev->ctrl);
|
||||
nvme_mark_namespaces_dead(&dev->ctrl);
|
||||
nvme_unquiesce_io_queues(&dev->ctrl);
|
||||
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ struct nvmet_ns {
|
|||
struct completion disable_done;
|
||||
mempool_t *bvec_pool;
|
||||
|
||||
int use_p2pmem;
|
||||
struct pci_dev *p2p_dev;
|
||||
int use_p2pmem;
|
||||
int pi_type;
|
||||
int metadata_size;
|
||||
u8 csi;
|
||||
|
|
Loading…
Reference in New Issue