Skip to content

Commit 54a76c8

Browse files
ikegami-tkeithbusch
authored andcommitted
nvme-rdma, nvme-tcp: include max reconnects for reconnect logging
Makes clear max reconnects translated by ctrl loss tmo and reconnect delay. Signed-off-by: Tokunori Ikegami <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent c51a22e commit 54a76c8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/nvme/host/rdma.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work)
11211121
return;
11221122

11231123
requeue:
1124-
dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d\n",
1125-
ctrl->ctrl.nr_reconnects);
1124+
dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d/%d\n",
1125+
ctrl->ctrl.nr_reconnects, ctrl->ctrl.opts->max_reconnects);
11261126
nvme_rdma_reconnect_or_remove(ctrl, ret);
11271127
}
11281128

drivers/nvme/host/tcp.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -2262,16 +2262,16 @@ static void nvme_tcp_reconnect_ctrl_work(struct work_struct *work)
22622262
if (ret)
22632263
goto requeue;
22642264

2265-
dev_info(ctrl->device, "Successfully reconnected (%d attempt)\n",
2266-
ctrl->nr_reconnects);
2265+
dev_info(ctrl->device, "Successfully reconnected (attempt %d/%d)\n",
2266+
ctrl->nr_reconnects, ctrl->opts->max_reconnects);
22672267

22682268
ctrl->nr_reconnects = 0;
22692269

22702270
return;
22712271

22722272
requeue:
2273-
dev_info(ctrl->device, "Failed reconnect attempt %d\n",
2274-
ctrl->nr_reconnects);
2273+
dev_info(ctrl->device, "Failed reconnect attempt %d/%d\n",
2274+
ctrl->nr_reconnects, ctrl->opts->max_reconnects);
22752275
nvme_tcp_reconnect_or_remove(ctrl, ret);
22762276
}
22772277

0 commit comments

Comments
 (0)