Thread (13 messages) 13 messages, 3 authors, 2021-03-11

Re: [PATCH V11 2/4] nvmet: add ZBD over ZNS backend support

From: Chaitanya Kulkarni <hidden>
Date: 2021-03-11 05:42:06

On 3/10/21 21:39, Damien Le Moal wrote:
quoted
quoted
quoted
+	nr_zones = (bufsize - sizeof(struct nvme_zone_report)) /
+			sizeof(struct nvme_zone_descriptor);
What if nr_zones is 0 ? This should be failed.
blkdev_report_zones() already handles that check. I thinkthe error condition
below blkdev_report_zones() should include<= 0 case instead of just <.
Reporting 0 zones with a valid buffer size (nr_zones > 0) is a valid reply, not
an error. This can happen depending on reporting options. Even though
blkdev_report_zones() does not allow reporting options, it would be strange to
fail empty reports.
I see, will add the check before calling the blkdev_report_zones() for
nr_zones == 0.

Thanks for the clarification.




_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help