File 0002-fabrics-Remove-double-connection-error-logging.patch of Package libnvme.27881
From: Daniel Wagner <dwagner@suse.de>
Date: Thu, 14 Apr 2022 12:18:53 +0200
Subject: fabrics: Remove double connection error logging
Git-commit: 5e48b0f38acd646ebce5d54b694bab051d41d1c6
References: bsc#1199994
nvmf_connect_disc_entry() is calling nvmf_add_ctrl() to do the
connecting attempt. We have in nvmf_add_ctrl() all error paths logging
enabled, so another logging in nvmf_connect_disc_entry() is not
necessary and introduces a problem such as nmve-cli users interpreting
this as hard error.
For example the kernel reports via < 0 return values state information
such as the connection is already there if the user runs 'nvme
connect-all' twice:
$ .build/nvme connect-all -t tcp --traddr=10.161.8.24 --trsvcid=4421
Failed to write to /dev/nvme-fabrics: Operation already in progress
failed to connect controller, error 1006
Let's remove this error message.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
src/nvme/fabrics.c | 2 --
1 file changed, 2 deletions(-)
--- a/src/nvme/fabrics.c
+++ b/src/nvme/fabrics.c
@@ -702,8 +702,6 @@ nvme_ctrl_t nvmf_connect_disc_entry(nvme
if (!ret)
return c;
}
- nvme_msg(h->r, LOG_ERR, "failed to connect controller, error %d\n",
- errno);
nvme_free_ctrl(c);
return NULL;
}