diff mbox series

[V4,5/9] nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev

Message ID 20201202062227.9826-6-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
Update the nvmet_execute_identify() such that it can now handle
NVME_ID_CNS_CS_CTRL when identify.cis is set to ZNS. This allows
host to identify the support for ZNS.

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:10 a.m. UTC | #1
On Tue, Dec 01, 2020 at 10:22:23PM -0800, Chaitanya Kulkarni wrote:
> Update the nvmet_execute_identify() such that it can now handle
> NVME_ID_CNS_CS_CTRL when identify.cis is set to ZNS. This allows
> host to identify the support for ZNS.

The changs in this and all following patches really belong into the current
patch 2.
Chaitanya Kulkarni Dec. 4, 2020, 3:20 a.m. UTC | #2
On 12/2/20 01:10, Christoph Hellwig wrote:
> On Tue, Dec 01, 2020 at 10:22:23PM -0800, Chaitanya Kulkarni wrote:
>> Update the nvmet_execute_identify() such that it can now handle
>> NVME_ID_CNS_CS_CTRL when identify.cis is set to ZNS. This allows
>> host to identify the support for ZNS.
> The changs in this and all following patches really belong into the current
> patch 2.
>

This and each following patch doing one specific thing for which host

side component is responsible, with one patch for backend handlers and

wiring up of the same on for admin-cmd.c and io-cmd-bdev.c seems

we are packing too much into one, unlike what we have has a nice

bottom-up flow for the implementation, why not we keep that nice flow ?
Christoph Hellwig Dec. 4, 2020, 9:28 a.m. UTC | #3
On Fri, Dec 04, 2020 at 03:20:40AM +0000, Chaitanya Kulkarni wrote:
> On 12/2/20 01:10, Christoph Hellwig wrote:
> > On Tue, Dec 01, 2020 at 10:22:23PM -0800, Chaitanya Kulkarni wrote:
> >> Update the nvmet_execute_identify() such that it can now handle
> >> NVME_ID_CNS_CS_CTRL when identify.cis is set to ZNS. This allows
> >> host to identify the support for ZNS.
> > The changs in this and all following patches really belong into the current
> > patch 2.
> >
> 
> This and each following patch doing one specific thing for which host
> 
> side component is responsible, with one patch for backend handlers and
> 
> wiring up of the same on for admin-cmd.c and io-cmd-bdev.c seems
> 
> we are packing too much into one, unlike what we have has a nice
> 
> bottom-up flow for the implementation, why not we keep that nice flow ?

Patches should do one thing at time.  With this series patch 2
is very incomplete, which makes both review and later reading the
commit history very hard.
diff mbox series

Patch

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index d4fc1bb1a318..e7d2b96cda6b 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -650,6 +650,10 @@  static void nvmet_execute_identify(struct nvmet_req *req)
 		return nvmet_execute_identify_ns(req);
 	case NVME_ID_CNS_CTRL:
 		return nvmet_execute_identify_ctrl(req);
+	case NVME_ID_CNS_CS_CTRL:
+		if (req->cmd->identify.csi == NVME_CSI_ZNS)
+			return nvmet_execute_identify_cns_cs_ctrl(req);
+		break;
 	case NVME_ID_CNS_NS_ACTIVE_LIST:
 		return nvmet_execute_identify_nslist(req);
 	case NVME_ID_CNS_NS_DESC_LIST: