nvme-fc: Add message when creating new controller
Subsystems (2)
PATCH 1/1 nvme-fc: Add message when creating new controller
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
--- drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/nvme/host/fc.c +4 -0
@@ -3129,6 +3129,10 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,nvme_get_ctrl (&ctrl->ctrl); +dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n" , + ctrl->cnum, ctrl->ctrl.opts->subsysnqn); +if (!queue_delayed_work (nvme_wq, &ctrl->connect_work,0 )) {nvme_put_ctrl (&ctrl->ctrl); dev_err(ctrl->ctrl.device,
Signature · 1 line
2.13.7
PATCH 1/1 nvme-fc: Add message when creating new controller
Looks good.
Quoted 30 lines · James Smart
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
Signed-off-by James Smart <jsmart2021 at gmail.com>--- drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/nvme/host/fc.c +4
-0@@ -3129,6 +3129,10 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,nvme_get_ctrl (&ctrl->ctrl); +dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n" , + ctrl->cnum, ctrl->ctrl.opts->subsysnqn); +if (!queue_delayed_work (nvme_wq, &ctrl->connect_work,0 )) {nvme_put_ctrl (&ctrl->ctrl); dev_err(ctrl->ctrl.device,
PATCH 1/1 nvme-fc: Add message when creating new controller
In reply to James SmartQuoted 19 lines · James Smart
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
Signed-off-by James Smart <jsmart2021 at gmail.com>--- drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/nvme/host/fc.c +0
-0
drivers/nvme/host/fc.c nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · line 3135
Quoted 7 lines
drivers/nvme/host/fc.c +4
-0@@ -3129,6 +3129,10 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,nvme_get_ctrl (&ctrl->ctrl); +dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n" , + ctrl->cnum, ctrl->ctrl.opts->subsysnqn); +
Adding rport+lport information would be helpful. It would be good to have for all messages, but at least one message establishing the relationship would make it easier when looking at logs.
Just wondering if there is any reason why no FC rport/lport info was logged with any of the messages in fc.c?
Regards,
-Arun
Quoted 4 lines
drivers/nvme/host/fc.c +0
-0if (!queue_delayed_work (nvme_wq, &ctrl->connect_work,0 )) {nvme_put_ctrl (&ctrl->ctrl); dev_err(ctrl->ctrl.device,
PATCH 1/1 nvme-fc: Add message when creating new controller
Quoted 26 lines · Arun Easi
Quoted 15 lines · James Smart
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
Signed-off-by James Smart <jsmart2021 at gmail.com>--- drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/nvme/host/fc.c nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · line 3135
Quoted 4 lines
drivers/nvme/host/fc.c +4
-0+dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n" , + ctrl->cnum, ctrl->ctrl.opts->subsysnqn); +Adding rport+lport information would be helpful. It would be good to have for all messages, but at least one message establishing the relationship would make it easier when looking at logs.
Quoted 2 lines
Just wondering if there is any reason why no FC rport/lport info was logged with any of the messages in
fc.c?
I actually asked myself the same question after sending the patch:
whether having host_traddr and traddr fields in that message made sense. I opted to stay as is only because it is much shorter (those WWN's are long).
The other question I had is whether I should print this only on initial creation or whenever a new association is started so it picks up the cases of when a reconnect start. Only disadvantage is - more long messages in the log.
I can easily be convinced to do something different if you prefer.
-- james
Quoted 28 lines · James Smart
----------------------------------------------------------------------
Quoted 26 lines · Arun Easi
Quoted 15 lines · James Smart
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
Signed-off-by James Smart <jsmart2021 at gmail.com>--- drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/nvme/host/fc.c nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · line 3135
Quoted 4 lines
drivers/nvme/host/fc.c +4
-0+dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n" , + ctrl->cnum, ctrl->ctrl.opts->subsysnqn); +Adding rport+lport information would be helpful. It would be good to have for all messages, but at least one message establishing the relationship would make it easier when looking at logs.
Quoted 6 lines
Quoted 2 lines
Just wondering if there is any reason why no FC rport/lport info was logged with any of the messages in
fc.c?I actually asked myself the same question after sending the patch: whether having
host_traddrand traddr fields in that message made sense. I opted to stay as is only because it is much shorter (those WWN's are long).
I agree, *traaddr-s are too long. Having just lport pWWN and rport pWWN, though still longer, would be good IMHO. Longer term, it would be great to have a nvmefc_info/warn/err that takes in a "ctrl" or other abstraction that can provide these additional information. That way messages remain consistent and easily changeable to usefulness/taste.
Quoted 4 lines
The other question I had is whether I should print this only on initial creation or whenever a new association is started so it picks up the cases of when a reconnect start.
+1 for reconnect. That way we can know every start of re-connects.
-- arun
Quoted 7 lines
Only disadvantage is - more long messages in the log.
I can easily be convinced to do something different if you prefer.
-- james
PATCH 1/1 nvme-fc: Add message when creating new controller
In reply to James SmartQuoted 35 lines · James Smart
Quoted 22 lines · Arun Easi
Quoted 15 lines · James Smart
When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started.
Add a message when the controller is first attempting to be connecting to. Thus we know what controller and its NQN is being put into place for any subsequent success or failure messages.
Signed-off-by James Smart <jsmart2021 at gmail.com>---
?drivers/nvme/host/fc.c| 4 ++++
? 1 file changed, 4 insertions(+)Quoted 4 lines
+??? dev_info(ctrl->ctrl.device,
+??????? "NVME-FC{%d}: creating new ctrl: NQN \"%s\"\n", +???????ctrl->cnum,ctrl->ctrl.opts->subsysnqn); +Quoted 6 lines
Adding rport+lport information would be helpful. It would be good to have for all messages, but at least one message establishing the relationship would make it easier when looking at logs.
Just wondering if there is any reason why no FC rport/lport info was logged with any of the messages in
fc.c?I actually asked myself the same question after sending the patch:
whether havinghost_traddrand traddr fields in that message made sense. I opted to stay as is only because it is much shorter (those WWN's are long).
Quoted 6 lines
The other question I had is whether I should print this only on initial creation or whenever a new association is started so it picks up the cases of when a reconnect start.? Only disadvantage is - more long messages in the log.
I can easily be convinced to do something different if you prefer.
I favor verbose messaging
Quoted 9 lines
-- james
_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dnvme&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=t2fPg9D87F7D8jm0_3CG9yoiIKdRg4qc_thBw4bzMhc&m=-tvfUIdJvX11XRrXVMd9syTIrIoJAFnwJP68H6ECzHw&s=D4NF6jMTh4KtdGzFq_DoNfKrJPM_nQg2IDqnG-3f3xQ&e=
Signature · 2 lines
Thank You, John
PATCH 1/1 nvme-fc: Add message when creating new controller
In reply to James SmartPlease ignore - new patch coming out shortly
-- james