* [PATCH] nvme-fc: fix error loop in create_hw_io_queues
@ 2020-10-16 21:06 James Smart
2020-10-19 10:04 ` Hannes Reinecke
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: James Smart @ 2020-10-16 21:06 UTC (permalink / raw)
To: linux-nvme; +Cc: James Smart
[-- Attachment #1.1: Type: text/plain, Size: 751 bytes --]
The loop that backs out of hw io queue creation continues through index
0, which corresponds to the admin queue as well.
Fix the loop so it only proceeds through indexes 1..n which correspond to
io queues.
Signed-off-by: James Smart <james.smart@broadcom.com>
---
drivers/nvme/host/fc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index e2e09e25c056..f002522146e2 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
return 0;
delete_queues:
- for (; i >= 0; i--)
+ for (; i > 0; i--)
__nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
return ret;
}
--
2.26.2
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4163 bytes --]
[-- Attachment #2: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme-fc: fix error loop in create_hw_io_queues
2020-10-16 21:06 [PATCH] nvme-fc: fix error loop in create_hw_io_queues James Smart
@ 2020-10-19 10:04 ` Hannes Reinecke
2020-10-19 14:55 ` Himanshu Madhani
2020-10-22 13:37 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2020-10-19 10:04 UTC (permalink / raw)
To: James Smart, linux-nvme
On 10/16/20 11:06 PM, James Smart wrote:
> The loop that backs out of hw io queue creation continues through index
> 0, which corresponds to the admin queue as well.
>
> Fix the loop so it only proceeds through indexes 1..n which correspond to
> io queues.
>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
> drivers/nvme/host/fc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index e2e09e25c056..f002522146e2 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
> return 0;
>
> delete_queues:
> - for (; i >= 0; i--)
> + for (; i > 0; i--)
> __nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
> return ret;
> }
>
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme-fc: fix error loop in create_hw_io_queues
2020-10-16 21:06 [PATCH] nvme-fc: fix error loop in create_hw_io_queues James Smart
2020-10-19 10:04 ` Hannes Reinecke
@ 2020-10-19 14:55 ` Himanshu Madhani
2020-10-22 13:37 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Himanshu Madhani @ 2020-10-19 14:55 UTC (permalink / raw)
To: James Smart; +Cc: linux-nvme
> On Oct 16, 2020, at 4:06 PM, James Smart <james.smart@broadcom.com> wrote:
>
> The loop that backs out of hw io queue creation continues through index
> 0, which corresponds to the admin queue as well.
>
> Fix the loop so it only proceeds through indexes 1..n which correspond to
> io queues.
>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
> drivers/nvme/host/fc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index e2e09e25c056..f002522146e2 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
> return 0;
>
> delete_queues:
> - for (; i >= 0; i--)
> + for (; i > 0; i--)
> __nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
> return ret;
> }
> --
> 2.26.2
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
--
Himanshu Madhani Oracle Linux Engineering
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme-fc: fix error loop in create_hw_io_queues
2020-10-16 21:06 [PATCH] nvme-fc: fix error loop in create_hw_io_queues James Smart
2020-10-19 10:04 ` Hannes Reinecke
2020-10-19 14:55 ` Himanshu Madhani
@ 2020-10-22 13:37 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-10-22 13:37 UTC (permalink / raw)
To: James Smart; +Cc: linux-nvme
Thanks,
applied.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-22 13:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 21:06 [PATCH] nvme-fc: fix error loop in create_hw_io_queues James Smart
2020-10-19 10:04 ` Hannes Reinecke
2020-10-19 14:55 ` Himanshu Madhani
2020-10-22 13:37 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).