File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments