Skip to content

Commit f0624c6

Browse files
committed
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
2 parents 08823e8 + 5a869d0 commit f0624c6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

drivers/nvme/host/auth.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct nvme_dhchap_queue_context {
3636
u8 status;
3737
u8 dhgroup_id;
3838
u8 hash_id;
39+
u8 sc_c;
3940
size_t hash_len;
4041
u8 c1[64];
4142
u8 c2[64];
@@ -154,6 +155,8 @@ static int nvme_auth_set_dhchap_negotiate_data(struct nvme_ctrl *ctrl,
154155
data->auth_protocol[0].dhchap.idlist[34] = NVME_AUTH_DHGROUP_6144;
155156
data->auth_protocol[0].dhchap.idlist[35] = NVME_AUTH_DHGROUP_8192;
156157

158+
chap->sc_c = data->sc_c;
159+
157160
return size;
158161
}
159162

@@ -489,7 +492,7 @@ static int nvme_auth_dhchap_setup_host_response(struct nvme_ctrl *ctrl,
489492
ret = crypto_shash_update(shash, buf, 2);
490493
if (ret)
491494
goto out;
492-
memset(buf, 0, sizeof(buf));
495+
*buf = chap->sc_c;
493496
ret = crypto_shash_update(shash, buf, 1);
494497
if (ret)
495498
goto out;
@@ -500,6 +503,7 @@ static int nvme_auth_dhchap_setup_host_response(struct nvme_ctrl *ctrl,
500503
strlen(ctrl->opts->host->nqn));
501504
if (ret)
502505
goto out;
506+
memset(buf, 0, sizeof(buf));
503507
ret = crypto_shash_update(shash, buf, 1);
504508
if (ret)
505509
goto out;

drivers/nvme/host/multipath.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,14 @@ void nvme_mpath_start_request(struct request *rq)
182182
struct nvme_ns *ns = rq->q->queuedata;
183183
struct gendisk *disk = ns->head->disk;
184184

185-
if (READ_ONCE(ns->head->subsys->iopolicy) == NVME_IOPOLICY_QD) {
185+
if ((READ_ONCE(ns->head->subsys->iopolicy) == NVME_IOPOLICY_QD) &&
186+
!(nvme_req(rq)->flags & NVME_MPATH_CNT_ACTIVE)) {
186187
atomic_inc(&ns->ctrl->nr_active);
187188
nvme_req(rq)->flags |= NVME_MPATH_CNT_ACTIVE;
188189
}
189190

190-
if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq))
191+
if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq) ||
192+
(nvme_req(rq)->flags & NVME_MPATH_IO_STATS))
191193
return;
192194

193195
nvme_req(rq)->flags |= NVME_MPATH_IO_STATS;

drivers/nvme/host/tcp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,9 @@ static void nvme_tcp_write_space(struct sock *sk)
10811081
queue = sk->sk_user_data;
10821082
if (likely(queue && sk_stream_is_writeable(sk))) {
10831083
clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
1084+
/* Ensure pending TLS partial records are retried */
1085+
if (nvme_tcp_queue_tls(queue))
1086+
queue->write_space(sk);
10841087
queue_work_on(queue->io_cpu, nvme_tcp_wq, &queue->io_work);
10851088
}
10861089
read_unlock_bh(&sk->sk_callback_lock);

0 commit comments

Comments
 (0)