* [PATCH 0/2] Improve response status code of nvme target
@ 2021-03-30 11:59 Hou Pu
2021-03-30 11:59 ` [PATCH 1/2] nvmet: return proper error code from discovery ctrl Hou Pu
2021-03-30 11:59 ` [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl() Hou Pu
0 siblings, 2 replies; 9+ messages in thread
From: Hou Pu @ 2021-03-30 11:59 UTC (permalink / raw
To: sagi, hch, chaitanya.kulkarni; +Cc: linux-nvme, houpu.main
This series includes some improvement of response status code.
Hou Pu (2):
nvmet: return proper error code from discovery ctrl
nvmet: remove unneeded code from nvmet_alloc_ctrl()
drivers/nvme/target/core.c | 1 -
drivers/nvme/target/discovery.c | 6 ++++--
2 files changed, 4 insertions(+), 3 deletions(-)
--
2.28.0
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] nvmet: return proper error code from discovery ctrl
2021-03-30 11:59 [PATCH 0/2] Improve response status code of nvme target Hou Pu
@ 2021-03-30 11:59 ` Hou Pu
2021-03-30 23:29 ` Chaitanya Kulkarni
2021-03-30 11:59 ` [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl() Hou Pu
1 sibling, 1 reply; 9+ messages in thread
From: Hou Pu @ 2021-03-30 11:59 UTC (permalink / raw
To: sagi, hch, chaitanya.kulkarni; +Cc: linux-nvme, houpu.main
Return NVME_SC_INVALID_FIELD from discovery controller
like normal controller when executing identify or
get log page command.
Signed-off-by: Hou Pu <houpu.main@gmail.com>
---
drivers/nvme/target/discovery.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index 682854e0e079..4845d12e374a 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -178,12 +178,14 @@ static void nvmet_execute_disc_get_log_page(struct nvmet_req *req)
if (req->cmd->get_log_page.lid != NVME_LOG_DISC) {
req->error_loc =
offsetof(struct nvme_get_log_page_command, lid);
- status = NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
+ status = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
goto out;
}
/* Spec requires dword aligned offsets */
if (offset & 0x3) {
+ req->error_loc =
+ offsetof(struct nvme_get_log_page_command, lpo);
status = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
goto out;
}
@@ -250,7 +252,7 @@ static void nvmet_execute_disc_identify(struct nvmet_req *req)
if (req->cmd->identify.cns != NVME_ID_CNS_CTRL) {
req->error_loc = offsetof(struct nvme_identify, cns);
- status = NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
+ status = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
goto out;
}
--
2.28.0
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl()
2021-03-30 11:59 [PATCH 0/2] Improve response status code of nvme target Hou Pu
2021-03-30 11:59 ` [PATCH 1/2] nvmet: return proper error code from discovery ctrl Hou Pu
@ 2021-03-30 11:59 ` Hou Pu
2021-03-30 23:30 ` Chaitanya Kulkarni
1 sibling, 1 reply; 9+ messages in thread
From: Hou Pu @ 2021-03-30 11:59 UTC (permalink / raw
To: sagi, hch, chaitanya.kulkarni; +Cc: linux-nvme, houpu.main
Signed-off-by: Hou Pu <houpu.main@gmail.com>
---
drivers/nvme/target/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index a027433b8be8..1c2130b344f2 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1325,7 +1325,6 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
goto out;
}
- status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
down_read(&nvmet_config_sem);
if (!nvmet_host_allowed(subsys, hostnqn)) {
pr_info("connect by host %s for subsystem %s not allowed\n",
--
2.28.0
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nvmet: return proper error code from discovery ctrl
2021-03-30 11:59 ` [PATCH 1/2] nvmet: return proper error code from discovery ctrl Hou Pu
@ 2021-03-30 23:29 ` Chaitanya Kulkarni
2021-03-31 2:16 ` Hou Pu
0 siblings, 1 reply; 9+ messages in thread
From: Chaitanya Kulkarni @ 2021-03-30 23:29 UTC (permalink / raw
To: Hou Pu, sagi@grimberg.me, hch@lst.de; +Cc: linux-nvme@lists.infradead.org
On 3/30/21 04:59, Hou Pu wrote:
> Return NVME_SC_INVALID_FIELD from discovery controller
> like normal controller when executing identify or
> get log page command.
>
> Signed-off-by: Hou Pu <houpu.main@gmail.com>
Commit could be :-
Return NVME_SC_INVALID_FIELD from discovery controller like normal
controller when executing identify or get log page command.
Can be done at the time of applying the patch.
With that looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl()
2021-03-30 11:59 ` [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl() Hou Pu
@ 2021-03-30 23:30 ` Chaitanya Kulkarni
2021-03-31 2:18 ` Hou Pu
0 siblings, 1 reply; 9+ messages in thread
From: Chaitanya Kulkarni @ 2021-03-30 23:30 UTC (permalink / raw
To: Hou Pu, sagi@grimberg.me, hch@lst.de; +Cc: linux-nvme@lists.infradead.org
On 3/30/21 04:59, Hou Pu wrote:
> Signed-off-by: Hou Pu <houpu.main@gmail.com>
> ---
> drivers/nvme/target/core.c | 1 -
> 1 file changed, 1 deletion(-)
On what branch you have generated this patch ?
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nvmet: return proper error code from discovery ctrl
2021-03-30 23:29 ` Chaitanya Kulkarni
@ 2021-03-31 2:16 ` Hou Pu
0 siblings, 0 replies; 9+ messages in thread
From: Hou Pu @ 2021-03-31 2:16 UTC (permalink / raw
To: Chaitanya Kulkarni, sagi@grimberg.me, hch@lst.de
Cc: linux-nvme@lists.infradead.org
On 2021/3/31 7:29 AM, Chaitanya Kulkarni wrote:
> On 3/30/21 04:59, Hou Pu wrote:
>> Return NVME_SC_INVALID_FIELD from discovery controller
>> like normal controller when executing identify or
>> get log page command.
>>
>> Signed-off-by: Hou Pu <houpu.main@gmail.com>
> Commit could be :-
>
> Return NVME_SC_INVALID_FIELD from discovery controller like normal
> controller when executing identify or get log page command.
>
> Can be done at the time of applying the patch.
>
> With that looks good.
>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
>
Thanks,
Hou
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl()
2021-03-30 23:30 ` Chaitanya Kulkarni
@ 2021-03-31 2:18 ` Hou Pu
2021-03-31 6:22 ` Chaitanya Kulkarni
0 siblings, 1 reply; 9+ messages in thread
From: Hou Pu @ 2021-03-31 2:18 UTC (permalink / raw
To: Chaitanya Kulkarni, sagi@grimberg.me, hch@lst.de
Cc: linux-nvme@lists.infradead.org
On 2021/3/31 7:30 上午, Chaitanya Kulkarni wrote:
> On 3/30/21 04:59, Hou Pu wrote:
>> Signed-off-by: Hou Pu <houpu.main@gmail.com>
>> ---
>> drivers/nvme/target/core.c | 1 -
>> 1 file changed, 1 deletion(-)
> On what branch you have generated this patch ?
>
>
The patch is based on v5.12-rc4.
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvme/target/core.c?h=v5.12-rc4#n1328)
Thanks,
Hou
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl()
2021-03-31 2:18 ` Hou Pu
@ 2021-03-31 6:22 ` Chaitanya Kulkarni
2021-03-31 6:36 ` Hou Pu
0 siblings, 1 reply; 9+ messages in thread
From: Chaitanya Kulkarni @ 2021-03-31 6:22 UTC (permalink / raw
To: Hou Pu; +Cc: linux-nvme@lists.infradead.org
On 3/30/21, 7:18 PM, "Hou Pu" <houpu.main@gmail.com> wrote:
On 2021/3/31 7:30 上午, Chaitanya Kulkarni wrote:
> On 3/30/21 04:59, Hou Pu wrote:
>> Signed-off-by: Hou Pu <houpu.main@gmail.com>
>> ---
>> drivers/nvme/target/core.c | 1 -
>> 1 file changed, 1 deletion(-)
> On what branch you have generated this patch ?
>
>
The patch is based on v5.12-rc4.
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvme/target/core.c?h=v5.12-rc4#n1328)
Thanks,
Hou
I think I've fixed this in 5.13, please check, if so we may need to drop this patch.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl()
2021-03-31 6:22 ` Chaitanya Kulkarni
@ 2021-03-31 6:36 ` Hou Pu
0 siblings, 0 replies; 9+ messages in thread
From: Hou Pu @ 2021-03-31 6:36 UTC (permalink / raw
To: Chaitanya Kulkarni; +Cc: linux-nvme@lists.infradead.org
On 2021/3/31 2:22 PM, Chaitanya Kulkarni wrote:
>
> On 3/30/21, 7:18 PM, "Hou Pu" <houpu.main@gmail.com> wrote:
>
>
> On 2021/3/31 7:30 上午, Chaitanya Kulkarni wrote:
> > On 3/30/21 04:59, Hou Pu wrote:
> >> Signed-off-by: Hou Pu <houpu.main@gmail.com>
> >> ---
> >> drivers/nvme/target/core.c | 1 -
> >> 1 file changed, 1 deletion(-)
> > On what branch you have generated this patch ?
> >
> >
> The patch is based on v5.12-rc4.
>
> (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvme/target/core.c?h=v5.12-rc4#n1328)
>
>
> Thanks,
>
> Hou
>
>
> I think I've fixed this in 5.13, please check, if so we may need to drop this patch.
Yes, just notice that from nvme.git tree. Thanks.
I will drop this in v2.
Thanks,
Hou
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-03-31 6:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 11:59 [PATCH 0/2] Improve response status code of nvme target Hou Pu
2021-03-30 11:59 ` [PATCH 1/2] nvmet: return proper error code from discovery ctrl Hou Pu
2021-03-30 23:29 ` Chaitanya Kulkarni
2021-03-31 2:16 ` Hou Pu
2021-03-30 11:59 ` [PATCH 2/2] nvmet: remove unneeded code from nvmet_alloc_ctrl() Hou Pu
2021-03-30 23:30 ` Chaitanya Kulkarni
2021-03-31 2:18 ` Hou Pu
2021-03-31 6:22 ` Chaitanya Kulkarni
2021-03-31 6:36 ` Hou Pu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.