Merge tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme into block-6.16

Pull NVMe fixes from Christoph:

"- revert the cross-controller atomic write size validation that caused
   regressions (Christoph Hellwig)
 - fix endianness of command word prints in nvme_log_err_passthru()
   (John Garry)
 - fix callback lock for TLS handshake (Maurizio Lombardi)
 - fix misaccounting of nvme-mpath inflight I/O (Yu Kuai)
 - fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list()
   (Zheng Qixing)"

* tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme:
  nvmet-tcp: fix callback lock for TLS handshake
  nvme: fix misaccounting of nvme-mpath inflight I/O
  nvme: revert the cross-controller atomic write size validation
  nvme: fix endianness of command word prints in nvme_log_err_passthru()
  nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list()
This commit is contained in:
Jens Axboe
2025-07-17 05:56:12 -06:00
2 changed files with 13 additions and 18 deletions
+11 -16
View File
@@ -381,12 +381,12 @@ static void nvme_log_err_passthru(struct request *req)
nr->status & NVME_SC_MASK, /* Status Code */
nr->status & NVME_STATUS_MORE ? "MORE " : "",
nr->status & NVME_STATUS_DNR ? "DNR " : "",
nr->cmd->common.cdw10,
nr->cmd->common.cdw11,
nr->cmd->common.cdw12,
nr->cmd->common.cdw13,
nr->cmd->common.cdw14,
nr->cmd->common.cdw15);
le32_to_cpu(nr->cmd->common.cdw10),
le32_to_cpu(nr->cmd->common.cdw11),
le32_to_cpu(nr->cmd->common.cdw12),
le32_to_cpu(nr->cmd->common.cdw13),
le32_to_cpu(nr->cmd->common.cdw14),
le32_to_cpu(nr->cmd->common.cdw15));
}
enum nvme_disposition {
@@ -764,6 +764,10 @@ blk_status_t nvme_fail_nonready_command(struct nvme_ctrl *ctrl,
!test_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags) &&
!blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
return BLK_STS_RESOURCE;
if (!(rq->rq_flags & RQF_DONTPREP))
nvme_clear_nvme_request(rq);
return nvme_host_path_error(rq);
}
EXPORT_SYMBOL_GPL(nvme_fail_nonready_command);
@@ -3537,15 +3541,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
if (ret)
goto out_free;
}
if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) {
dev_err_ratelimited(ctrl->device,
"inconsistent AWUPF, controller not added (%u/%u).\n",
le16_to_cpu(id->awupf), ctrl->subsys->awupf);
ret = -EINVAL;
goto out_free;
}
memcpy(ctrl->subsys->firmware_rev, id->fr,
sizeof(ctrl->subsys->firmware_rev));
@@ -4077,7 +4072,7 @@ static void nvme_ns_add_to_ctrl_list(struct nvme_ns *ns)
return;
}
}
list_add(&ns->list, &ns->ctrl->namespaces);
list_add_rcu(&ns->list, &ns->ctrl->namespaces);
}
static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
+2 -2
View File
@@ -1928,10 +1928,10 @@ static void nvmet_tcp_alloc_queue(struct nvmet_tcp_port *port,
struct sock *sk = queue->sock->sk;
/* Restore the default callbacks before starting upcall */
read_lock_bh(&sk->sk_callback_lock);
write_lock_bh(&sk->sk_callback_lock);
sk->sk_user_data = NULL;
sk->sk_data_ready = port->data_ready;
read_unlock_bh(&sk->sk_callback_lock);
write_unlock_bh(&sk->sk_callback_lock);
if (!nvmet_tcp_try_peek_pdu(queue)) {
if (!nvmet_tcp_tls_handshake(queue))
return;