From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Cc: hch@lst.de, sagi@grimberg.me, damien.lemoal@wdc.com, Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Subject: [PATCH 0/9] nvmet: add genblk ZBD backend Date: Sun, 29 Nov 2020 19:29:00 -0800 [thread overview] Message-ID: <20201130032909.40638-1-chaitanya.kulkarni@wdc.com> (raw) NVMeOF Host is capable of handling the NVMe Protocol based Zoned Block Devices (ZBD) in the ZNS mode with the passthru backend. There is no support for a generic block device backend to handle the ZBD devices which are not NVMe devices. This adds support to export the ZBD drives (which are not NVMe drives) to host from the target with NVMeOF using the host side ZNS interface. The patch series is generated in bottom-top manner where, it first adds prep patch and ZNS command-specific handlers on the top of genblk and updates the data structures, then one by one it wires up the admin cmds in the order host calls them in namespace initializing sequence. Once everything is ready, it wires-up the I/O command handlers. See below for patch-series overview. I've tested the ZoneFS testcases with the null_blk memory backed NVMeOF namespace with nvme-loop transport. The same testcases are passing on the NVMeOF zbd-ns and are passing for null_blk without NVMeOF . Regards, Chaitanya Changes from V1:- 1. Remove the nvmet-$(CONFIG_BLK_DEV_ZONED) += zns.o. 2. Mark helpers inline. 3. Fix typos in the comments and update the comments. 4. Get rid of the curly brackets. 5. Don't allow drives with last smaller zones. 6. Calculate the zasl as a function of max_zone_append_sectors, bio_max_pages so we don't have to split the bio. 7. Add global subsys->zasl and update the zasl when new namespace is enabled. 8. Rmove the loop in the nvmet_bdev_execute_zone_mgmt_recv() and move functionality in to the report zone callback. 9. Add goto for default case in nvmet_bdev_execute_zone_mgmt_send(). 10, Allocate the zones buffer with zones size instead of bdev nr_zones. Chaitanya Kulkarni (9): block: export __bio_iov_append_get_pages() Prep patch needed for implementing Zone Append. nvmet: add ZNS support for bdev-ns Core Command handlers and various helpers for ZBD backend which will be called by target-core/target-admin etc. nvmet: trim down id-desclist to use req->ns Cleanup needed to avoid the code repetation for passing extra function parameters for ZBD backend handlers. nvmet: add NVME_CSI_ZNS in ns-desc for zbdev Allows host to identify zoned namesapce. nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev Allows host to identify controller with the ZBD-ZNS. nvmet: add cns-cs-ns in id-ctrl for ZNS bdev Allows host to identify namespace with the ZBD-ZNS. nvmet: add zns cmd effects to support zbdev Allows host to support the ZNS commands when zoned-blkdev is selected. nvmet: add zns bdev config support Allows user to override any target namespace attributes for ZBD. nvmet: add ZNS based I/O cmds handlers Handlers for Zone-Mgmt-Send/Zone-Mgmt-Recv/Zone-Append. block/bio.c | 3 +- drivers/nvme/target/Makefile | 2 +- drivers/nvme/target/admin-cmd.c | 38 ++- drivers/nvme/target/io-cmd-bdev.c | 12 + drivers/nvme/target/io-cmd-file.c | 2 +- drivers/nvme/target/nvmet.h | 19 ++ drivers/nvme/target/zns.c | 463 ++++++++++++++++++++++++++++++ include/linux/bio.h | 1 + 8 files changed, 524 insertions(+), 16 deletions(-) create mode 100644 drivers/nvme/target/zns.c -- 2.22.1
WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Cc: damien.lemoal@wdc.com, hch@lst.de, Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>, sagi@grimberg.me Subject: [PATCH 0/9] nvmet: add genblk ZBD backend Date: Sun, 29 Nov 2020 19:29:00 -0800 [thread overview] Message-ID: <20201130032909.40638-1-chaitanya.kulkarni@wdc.com> (raw) NVMeOF Host is capable of handling the NVMe Protocol based Zoned Block Devices (ZBD) in the ZNS mode with the passthru backend. There is no support for a generic block device backend to handle the ZBD devices which are not NVMe devices. This adds support to export the ZBD drives (which are not NVMe drives) to host from the target with NVMeOF using the host side ZNS interface. The patch series is generated in bottom-top manner where, it first adds prep patch and ZNS command-specific handlers on the top of genblk and updates the data structures, then one by one it wires up the admin cmds in the order host calls them in namespace initializing sequence. Once everything is ready, it wires-up the I/O command handlers. See below for patch-series overview. I've tested the ZoneFS testcases with the null_blk memory backed NVMeOF namespace with nvme-loop transport. The same testcases are passing on the NVMeOF zbd-ns and are passing for null_blk without NVMeOF . Regards, Chaitanya Changes from V1:- 1. Remove the nvmet-$(CONFIG_BLK_DEV_ZONED) += zns.o. 2. Mark helpers inline. 3. Fix typos in the comments and update the comments. 4. Get rid of the curly brackets. 5. Don't allow drives with last smaller zones. 6. Calculate the zasl as a function of max_zone_append_sectors, bio_max_pages so we don't have to split the bio. 7. Add global subsys->zasl and update the zasl when new namespace is enabled. 8. Rmove the loop in the nvmet_bdev_execute_zone_mgmt_recv() and move functionality in to the report zone callback. 9. Add goto for default case in nvmet_bdev_execute_zone_mgmt_send(). 10, Allocate the zones buffer with zones size instead of bdev nr_zones. Chaitanya Kulkarni (9): block: export __bio_iov_append_get_pages() Prep patch needed for implementing Zone Append. nvmet: add ZNS support for bdev-ns Core Command handlers and various helpers for ZBD backend which will be called by target-core/target-admin etc. nvmet: trim down id-desclist to use req->ns Cleanup needed to avoid the code repetation for passing extra function parameters for ZBD backend handlers. nvmet: add NVME_CSI_ZNS in ns-desc for zbdev Allows host to identify zoned namesapce. nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev Allows host to identify controller with the ZBD-ZNS. nvmet: add cns-cs-ns in id-ctrl for ZNS bdev Allows host to identify namespace with the ZBD-ZNS. nvmet: add zns cmd effects to support zbdev Allows host to support the ZNS commands when zoned-blkdev is selected. nvmet: add zns bdev config support Allows user to override any target namespace attributes for ZBD. nvmet: add ZNS based I/O cmds handlers Handlers for Zone-Mgmt-Send/Zone-Mgmt-Recv/Zone-Append. block/bio.c | 3 +- drivers/nvme/target/Makefile | 2 +- drivers/nvme/target/admin-cmd.c | 38 ++- drivers/nvme/target/io-cmd-bdev.c | 12 + drivers/nvme/target/io-cmd-file.c | 2 +- drivers/nvme/target/nvmet.h | 19 ++ drivers/nvme/target/zns.c | 463 ++++++++++++++++++++++++++++++ include/linux/bio.h | 1 + 8 files changed, 524 insertions(+), 16 deletions(-) create mode 100644 drivers/nvme/target/zns.c -- 2.22.1 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme
next reply other threads:[~2020-11-30 3:30 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-30 3:29 Chaitanya Kulkarni [this message] 2020-11-30 3:29 ` [PATCH 0/9] nvmet: add genblk ZBD backend Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 1/9] block: export __bio_iov_append_get_pages() Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 2/9] nvmet: add ZNS support for bdev-ns Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 11:57 ` Damien Le Moal 2020-11-30 11:57 ` Damien Le Moal 2020-12-01 3:38 ` Chaitanya Kulkarni 2020-12-01 3:38 ` Chaitanya Kulkarni 2020-12-01 5:44 ` Damien Le Moal 2020-12-01 5:44 ` Damien Le Moal 2020-12-01 22:37 ` Chaitanya Kulkarni 2020-12-01 22:37 ` Chaitanya Kulkarni 2020-11-30 12:29 ` Johannes Thumshirn 2020-11-30 12:29 ` Johannes Thumshirn 2020-12-01 3:49 ` Chaitanya Kulkarni 2020-12-01 3:49 ` Chaitanya Kulkarni 2020-12-01 7:51 ` Johannes Thumshirn 2020-12-01 7:51 ` Johannes Thumshirn 2020-12-01 22:36 ` Chaitanya Kulkarni 2020-12-01 22:36 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 3/9] nvmet: trim down id-desclist to use req->ns Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 4/9] nvmet: add NVME_CSI_ZNS in ns-desc for zbdev Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 5/9] nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 6/9] nvmet: add cns-cs-ns " Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 7/9] nvmet: add zns cmd effects to support zbdev Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 8/9] nvmet: add zns bdev config support Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 12:02 ` Damien Le Moal 2020-11-30 12:02 ` Damien Le Moal 2020-12-01 3:40 ` Chaitanya Kulkarni 2020-12-01 3:40 ` Chaitanya Kulkarni 2020-11-30 3:29 ` [PATCH V2 9/9] nvmet: add ZNS based I/O cmds handlers Chaitanya Kulkarni 2020-11-30 3:29 ` Chaitanya Kulkarni 2020-11-30 6:51 ` [PATCH 0/9] nvmet: add genblk ZBD backend Damien Le Moal 2020-11-30 6:51 ` Damien Le Moal 2020-12-01 3:42 ` Chaitanya Kulkarni 2020-12-01 3:42 ` Chaitanya Kulkarni -- strict thread matches above, loose matches on Subject: below -- 2020-11-26 2:40 Chaitanya Kulkarni 2020-11-26 2:40 ` Chaitanya Kulkarni 2020-11-26 8:07 ` Damien Le Moal 2020-11-26 8:07 ` Damien Le Moal
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201130032909.40638-1-chaitanya.kulkarni@wdc.com \ --to=chaitanya.kulkarni@wdc.com \ --cc=damien.lemoal@wdc.com \ --cc=hch@lst.de \ --cc=linux-block@vger.kernel.org \ --cc=linux-nvme@lists.infradead.org \ --cc=sagi@grimberg.me \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.