diff mbox series

[V4,4/9] nvmet: add NVME_CSI_ZNS in ns-desc for zbdev

Message ID 20201202062227.9826-5-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series nvmet: add ZBD backend support | expand

Commit Message

Chaitanya Kulkarni Dec. 2, 2020, 6:22 a.m. UTC
When discovering the ZNS, the host-side looks for the NVME_CSI_ZNS
value in the ns-desc. Update the nvmet_execute_identify_desclist()
such that it can now update the ns-desc with NVME_CSI_ZNS if bdev is
zoned.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/nvme/target/admin-cmd.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Christoph Hellwig Dec. 2, 2020, 9:09 a.m. UTC | #1
As mentioned before CSI support is a feature independen of ZNS and should
be supported on all controllers, and in a separate prep patch.
Chaitanya Kulkarni Dec. 4, 2020, 3:14 a.m. UTC | #2
On 12/2/20 01:09, Christoph Hellwig wrote:
> As mentioned before CSI support is a feature independen of ZNS and should
> be supported on all controllers, and in a separate prep patch.
>
Okay.
diff mbox series

Patch

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index c64b40c631e0..d4fc1bb1a318 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -628,6 +628,10 @@  static void nvmet_execute_identify_desclist(struct nvmet_req *req)
 			goto out;
 	}
 
+	status = nvmet_process_zns_cis(req, &off);
+	if (status)
+		goto out;
+
 	if (sg_zero_buffer(req->sg, req->sg_cnt, NVME_IDENTIFY_DATA_SIZE - off,
 			off) != NVME_IDENTIFY_DATA_SIZE - off)
 		status = NVME_SC_INTERNAL | NVME_SC_DNR;