tests/nvme: Set clear_ids for passthru targets
Subsystems (2)
PATCH 1/1 tests/nvme: Set clear_ids for passthru targets
This allows to connect to passthru targets when the client and target are on the same host.
--- tests/nvme/rc | 3 +++ 1 file changed, 3 insertions(+)
tests/nvme/rc +3 -0
@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi } _remove_nvmet_passhtru() {
Signature · 1 line
2.31.1
Quoted 13 lines · Alan Adamson
This allows to connect to passthru targets when the client and target are on the same host.
Signed-off-by Alan Adamson <[email protected]>--- tests/nvme/rc | 3 +++ 1 file changed, 3 insertions(+)tests/nvme/rc +0
-0
tests/nvme/rc _create_nvmet_passthru() { · line 311
Quoted 9 lines
tests/nvme/rc +3
-0@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi } _remove_nvmet_passhtru() {
without looking into the code, just wondering whether we need an explicit check to ensure that both host and target on the same machine something like checking nvme_trtype=loop ?
-ck
Quoted 26 lines · Chaitanya Kulkarni
Quoted 21 lines · Alan Adamson
This allows to connect to passthru targets when the client and target are on the same host.
Signed-off-by Alan Adamson <[email protected]>--- tests/nvme/rc | 3 +++ 1 file changed, 3 insertions(+)tests/nvme/rc +3
-0@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi }
Quoted 5 lines
tests/nvme/rc _create_nvmet_passthru() { · line 311
Quoted 1 line
tests/nvme/rc +0
-0_remove_nvmet_passhtru() {without looking into the code, just wondering whether we need an explicit check to ensure that both host and target on the same machine something like checking nvme_trtype=loop ?
If nvme_trtype=loop, this code isn’t necessary because loop defaults to clear_ids, but it is necessary for tcp and rdma. The check is for necessary when running a pre 5.19 kernel where clear_ids isn’t present just to prevent a error message.
Alan
Quoted 36 lines · Alan Adamson
Quoted 27 lines · Chaitanya Kulkarni
Quoted 21 lines · Alan Adamson
This allows to connect to passthru targets when the client and target are on the same host.
Signed-off-by Alan Adamson <[email protected]>---
tests/nvme/rc | 3 +++1 file changed, 3 insertions(+)tests/nvme/rc +3
-0@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi }Quoted 5 lines
tests/nvme/rc _create_nvmet_passthru() { · line 311
Quoted 1 line
tests/nvme/rc +0
-0_remove_nvmet_passhtru() {without looking into the code, just wondering whether we need an explicit check to ensure that both host and target on the same machine something like checking nvme_trtype=loop ?
Quoted 6 lines
If nvme_trtype=loop, this code isn’t necessary because loop defaults to
clear_ids, but it is necessary for tcp and rdma. The check is for necessary when running a pre 5.19 kernel whereclear_idsisn’t present just to prevent a error message.Alan
Any other comments or feedback?
Alan
Shinichiro Kawasaki
AppliedQuoted 36 lines · Alan Adamson
Quoted 36 lines · Alan Adamson
Quoted 32 lines · Chaitanya Kulkarni
Quoted 13 lines · Alan Adamson
This allows to connect to passthru targets when the client and target are on the same host.
Signed-off-by Alan Adamson <[email protected]>---
tests/nvme/rc | 3 +++1 file changed, 3 insertions(+)tests/nvme/rc +0
-0tests/nvme/rc _create_nvmet_passthru() { · line 311
Quoted 9 lines
tests/nvme/rc +3
-0@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi } _remove_nvmet_passhtru() {without looking into the code, just wondering whether we need an explicit check to ensure that both host and target on the same machine something like checking nvme_trtype=loop ?
Quoted 8 lines
Quoted 6 lines
If nvme_trtype=loop, this code isn’t necessary because loop defaults to
clear_ids, but it is necessary for tcp and rdma. The check is for necessary when running a pre 5.19 kernel whereclear_idsisn’t present just to prevent a error message.Alan
Any other comments or feedback?
I've applied the patch with an edit to replace single bracket to double brackets. Wish this edit is ok for you. Thanks!
Signature · 1 line
Shin'ichiro Kawasaki
Quoted 46 lines · Shinichiro Kawasaki
Quoted 41 lines · Alan Adamson
Quoted 41 lines · Alan Adamson
Quoted 27 lines · Chaitanya Kulkarni
Quoted 21 lines · Alan Adamson
This allows to connect to passthru targets when the client and target are on the same host.
Signed-off-by Alan Adamson <[email protected]>---
tests/nvme/rc | 3 +++1 file changed, 3 insertions(+)tests/nvme/rc +3
-0@@ -303,6 +303,9 @@ _create_nvmet_passthru() { _test_dev_nvme_ctrl > "${passthru_path}/device_path" echo 1 > "${passthru_path}/enable" + if [ -f "${passthru_path}/clear_ids" ]; then + echo 1 > "${passthru_path}/clear_ids" + fi }Quoted 5 lines
tests/nvme/rc _create_nvmet_passthru() { · line 311
Quoted 1 line
tests/nvme/rc +0
-0_remove_nvmet_passhtru() {without looking into the code, just wondering whether we need an explicit check to ensure that both host and target on the same machine something like checking nvme_trtype=loop ?
If nvme_trtype=loop, this code isn’t necessary because loop defaults to
clear_ids, but it is necessary for tcp and rdma. The check is for necessary when running a pre 5.19 kernel whereclear_idsisn’t present just to prevent a error message.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Alan
Any other comments or feedback?
I've applied the patch with an edit to replace single bracket to double brackets. Wish this edit is ok for you. Thanks!
Looks good.
Thanks!
Alan
Quoted 3 lines
Signature · 2 lines
-- Shin'ichiro Kawasaki