nvme_fc: set logging level on resets/deletes
Subsystems (2)
PATCH 1/1 nvme_fc: set logging level on resets/deletes
From: James Smart <[email protected]>
Per the review by Sagi on:
http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html
Looked at existing warn vs info vs err dev_xxx levels for the messages printed on reconnects and deletes:
- Resets due to error and resets transitioned to deletes are dev_warn
- Other reset/disconnect messages are dev_info
- Added admin-requested delete info message
- Removed chatty io queue related messages
--- drivers/nvme/host/fc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/nvme/host/fc.c +7 -10
@@ -1751,7 +1751,7 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)dev_warn (ctrl->ctrl.device,"NVME-FC{%d}: transport association error detected: %s\n" , ctrl->cnum, errmsg); -dev_info (ctrl->ctrl.device, +dev_warn (ctrl->ctrl.device,"NVME-FC{%d}: resetting controller\n" , ctrl->cnum);/* stop the queues on error, cleanup is in reset thread */
@@ -2195,9 +2195,6 @@ nvme_fc_create_io_queues(struct nvme_fc_ctrl *ctrl)if (!opts->nr_io_queues)return 0 ; -dev_info (ctrl->ctrl.device,"creating %d I/O queues.\n" , - opts->nr_io_queues); -nvme_fc_init_io_queues (ctrl);memset (&ctrl->tag_set,0 ,sizeof (ctrl->tag_set));
@@ -2268,9 +2265,6 @@ nvme_fc_reinit_io_queues(struct nvme_fc_ctrl *ctrl)if (ctrl->queue_count ==1 )return 0 ; -dev_info (ctrl->ctrl.device,"Recreating %d I/O queues.\n" , - opts->nr_io_queues); -nvme_fc_init_io_queues (ctrl); ret =blk_mq_reinit_tagset (&ctrl->tag_set);
@@ -2577,6 +2571,9 @@ nvme_fc_del_nvme_ctrl(struct nvme_ctrl *nctrl)struct nvme_fc_ctrl *ctrl =to_fc_ctrl (nctrl);int ret; +dev_info (ctrl->ctrl.device, +"NVME-FC{%d}: admin requested controller delete\n" , ctrl->cnum); +if (!kref_get_unless_zero (&ctrl->ctrl.kref))return -EBUSY ;
@@ -2600,7 +2597,7 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)return ; } -dev_warn (ctrl->ctrl.device, +dev_info (ctrl->ctrl.device,"NVME-FC{%d}: reset: Reconnect attempt failed (%d)\n" , ctrl->cnum, status);
@@ -2611,7 +2608,7 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)queue_delayed_work (nvme_fc_wq, &ctrl->connect_work, ctrl->ctrl.opts->reconnect_delay *HZ ); }else { -dev_info (ctrl->ctrl.device, +dev_warn (ctrl->ctrl.device,"NVME-FC{%d}: Max reconnect attempts (%d) " "reached. Removing controller\n" , ctrl->cnum, ctrl->ctrl.opts->nr_reconnects);
@@ -2646,7 +2643,7 @@ nvme_fc_reset_nvme_ctrl(struct nvme_ctrl *nctrl) {struct nvme_fc_ctrl *ctrl =to_fc_ctrl (nctrl); -dev_warn (ctrl->ctrl.device, +dev_info (ctrl->ctrl.device,"NVME-FC{%d}: admin requested controller reset\n" , ctrl->cnum);if (!nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_RESETTING ))
Signature · 1 line
2.9.3
PATCH 1/1 nvme_fc: set logging level on resets/deletes
Hi James,
Quoted 14 lines · On 04/26/2017 12:32 AM, [email protected] wrote:
From: James Smart <jsmart2021 at gmail.com>
Per the review by Sagi on:
http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.htmlLooked at existing warn vs info vs err
dev_xxxlevels for the messages printed on reconnects and deletes:
- Resets due to error and resets transitioned to deletes aredev_warn
- Other reset/disconnect messages aredev_info
- Added admin-requested delete info message
- Removed chatty io queue related messagesSigned-off-by James Smart <james.smart at broadcom.com>---
[...]
Quoted 8 lines
drivers/nvme/host/fc.c +0
-3-dev_info (ctrl->ctrl.device,"creating %d I/O queues.\n" , - opts->nr_io_queues); -nvme_fc_init_io_queues (ctrl);memset (&ctrl->tag_set,0 ,sizeof (ctrl->tag_set));
drivers/nvme/host/fc.c nvme_fc_reinit_io_queues(struct nvme_fc_ctrl *ctrl) · line 2270
Quoted 9 lines
drivers/nvme/host/fc.c +0
-3@@ -2268,9 +2265,6 @@ nvme_fc_reinit_io_queues(struct nvme_fc_ctrl *ctrl)if (ctrl->queue_count ==1 )return 0 ; -dev_info (ctrl->ctrl.device,"Recreating %d I/O queues.\n" , - opts->nr_io_queues); -nvme_fc_init_io_queues (ctrl); ret =blk_mq_reinit_tagset (&ctrl->tag_set);
Can you maybe change the above two messages to dev_debug()? I have a gut feeling that they might become handy one day.
Otherwise,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 1/1 nvme_fc: set logging level on resets/deletes
Quoted 2 lines · Johannes Thumshirn
Can you maybe change the above two messages to
dev_debug()? I have a gut feeling that they might become handy one day.
After debugging things, I didn't find these providing anything of value, thus their deletion. The debug message of the connecting-to subnqn is more than enough to derive this (e.g. is it the discovery nqn or not; as only discovery ctrl would not attempt io queues), and additional actions on the link, as well as messages by the target as it creates queues was enough.
-- james
PATCH 1/1 nvme_fc: set logging level on resets/deletes
Quoted 4 lines · James Smart
Quoted 2 lines · Johannes Thumshirn
Can you maybe change the above two messages to
dev_debug()? I have a gut feeling that they might become handy one day.
Quoted 9 lines
After debugging things, I didn't find these providing anything of value, thus their deletion. The debug message of the connecting-to subnqn is more than enough to derive this (e.g. is it the discovery nqn or not; as only discovery ctrl would not attempt io queues), and additional actions on the link, as well as messages by the target as it creates queues was enough.
-- james
OK fair enough,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 1/1 nvme_fc: set logging level on resets/deletes
In reply to [email protected]This doesn't seem to apply for me.