Commit f0624c66 authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge tag 'nvme-6.18-2025-10-16' of git://git.infradead.org/nvme into block-6.18

Pull NVMe fixes from Keith:

"- iostats accounting fixed on multipath retries (Amit)
 - secure concatenation response fixup (Martin)
 - tls partial record fixup (Wilfred)"

* tag 'nvme-6.18-2025-10-16' of git://git.infradead.org/nvme:
  nvme/tcp: handle tls partially sent records in write_space()
  nvme-auth: update sc_c in host response
  nvme-multipath: Skip nr_active increments in RETRY disposition
parents 08823e89 5a869d01
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ struct nvme_dhchap_queue_context {
	u8 status;
	u8 dhgroup_id;
	u8 hash_id;
	u8 sc_c;
	size_t hash_len;
	u8 c1[64];
	u8 c2[64];
@@ -154,6 +155,8 @@ static int nvme_auth_set_dhchap_negotiate_data(struct nvme_ctrl *ctrl,
	data->auth_protocol[0].dhchap.idlist[34] = NVME_AUTH_DHGROUP_6144;
	data->auth_protocol[0].dhchap.idlist[35] = NVME_AUTH_DHGROUP_8192;

	chap->sc_c = data->sc_c;

	return size;
}

@@ -489,7 +492,7 @@ static int nvme_auth_dhchap_setup_host_response(struct nvme_ctrl *ctrl,
	ret = crypto_shash_update(shash, buf, 2);
	if (ret)
		goto out;
	memset(buf, 0, sizeof(buf));
	*buf = chap->sc_c;
	ret = crypto_shash_update(shash, buf, 1);
	if (ret)
		goto out;
@@ -500,6 +503,7 @@ static int nvme_auth_dhchap_setup_host_response(struct nvme_ctrl *ctrl,
				  strlen(ctrl->opts->host->nqn));
	if (ret)
		goto out;
	memset(buf, 0, sizeof(buf));
	ret = crypto_shash_update(shash, buf, 1);
	if (ret)
		goto out;
+4 −2
Original line number Diff line number Diff line
@@ -182,12 +182,14 @@ void nvme_mpath_start_request(struct request *rq)
	struct nvme_ns *ns = rq->q->queuedata;
	struct gendisk *disk = ns->head->disk;

	if (READ_ONCE(ns->head->subsys->iopolicy) == NVME_IOPOLICY_QD) {
	if ((READ_ONCE(ns->head->subsys->iopolicy) == NVME_IOPOLICY_QD) &&
	    !(nvme_req(rq)->flags & NVME_MPATH_CNT_ACTIVE)) {
		atomic_inc(&ns->ctrl->nr_active);
		nvme_req(rq)->flags |= NVME_MPATH_CNT_ACTIVE;
	}

	if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq))
	if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq) ||
	    (nvme_req(rq)->flags & NVME_MPATH_IO_STATS))
		return;

	nvme_req(rq)->flags |= NVME_MPATH_IO_STATS;
+3 −0
Original line number Diff line number Diff line
@@ -1081,6 +1081,9 @@ static void nvme_tcp_write_space(struct sock *sk)
	queue = sk->sk_user_data;
	if (likely(queue && sk_stream_is_writeable(sk))) {
		clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
		/* Ensure pending TLS partial records are retried */
		if (nvme_tcp_queue_tls(queue))
			queue->write_space(sk);
		queue_work_on(queue->io_cpu, nvme_tcp_wq, &queue->io_work);
	}
	read_unlock_bh(&sk->sk_callback_lock);