All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: sagi@grimberg.me, hch@lst.de, damien.lemoal@wdc.com,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH V3 8/9] nvmet: add zns bdev config support
Date: Mon, 30 Nov 2020 20:14:15 -0800	[thread overview]
Message-ID: <20201201041416.16293-9-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20201201041416.16293-1-chaitanya.kulkarni@wdc.com>

For zbd based bdev backend we need to override the ns->blksize_shift
with the physical block size instead of using the logical block size
so that SMR drives will not result in an error.

Update the nvmet_bdev_ns_enable() to reflect that.

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

diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c
index 125dde3f410e..e1f6d59dd341 100644
--- a/drivers/nvme/target/io-cmd-bdev.c
+++ b/drivers/nvme/target/io-cmd-bdev.c
@@ -86,6 +86,9 @@ int nvmet_bdev_ns_enable(struct nvmet_ns *ns)
 	if (IS_ENABLED(CONFIG_BLK_DEV_INTEGRITY_T10))
 		nvmet_bdev_ns_enable_integrity(ns);
 
+	if (bdev_is_zoned(ns->bdev) && !nvmet_bdev_zns_enable(ns))
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
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, sagi@grimberg.me,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	hch@lst.de
Subject: [PATCH V3 8/9] nvmet: add zns bdev config support
Date: Mon, 30 Nov 2020 20:14:15 -0800	[thread overview]
Message-ID: <20201201041416.16293-9-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20201201041416.16293-1-chaitanya.kulkarni@wdc.com>

For zbd based bdev backend we need to override the ns->blksize_shift
with the physical block size instead of using the logical block size
so that SMR drives will not result in an error.

Update the nvmet_bdev_ns_enable() to reflect that.

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

diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c
index 125dde3f410e..e1f6d59dd341 100644
--- a/drivers/nvme/target/io-cmd-bdev.c
+++ b/drivers/nvme/target/io-cmd-bdev.c
@@ -86,6 +86,9 @@ int nvmet_bdev_ns_enable(struct nvmet_ns *ns)
 	if (IS_ENABLED(CONFIG_BLK_DEV_INTEGRITY_T10))
 		nvmet_bdev_ns_enable_integrity(ns);
 
+	if (bdev_is_zoned(ns->bdev) && !nvmet_bdev_zns_enable(ns))
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2020-12-01  4:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:14 [PATCH V3 0/9] nvmet: add ZBD backend support Chaitanya Kulkarni
2020-12-01  4:14 ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 1/9] block: export __bio_iov_append_get_pages() Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 2/9] nvmet: add ZNS support for bdev-ns Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 3/9] nvmet: trim down id-desclist to use req->ns Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 4/9] nvmet: add NVME_CSI_ZNS in ns-desc for zbdev Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 5/9] nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 6/9] nvmet: add cns-cs-ns " Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 7/9] nvmet: add zns cmd effects to support zbdev Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  4:14 ` Chaitanya Kulkarni [this message]
2020-12-01  4:14   ` [PATCH V3 8/9] nvmet: add zns bdev config support Chaitanya Kulkarni
2020-12-01  4:14 ` [PATCH V3 9/9] nvmet: add ZNS based I/O cmds handlers Chaitanya Kulkarni
2020-12-01  4:14   ` Chaitanya Kulkarni
2020-12-01  6:46 ` [PATCH V3 0/9] nvmet: add ZBD backend support Damien Le Moal
2020-12-01  6:46   ` Damien Le Moal
2020-12-01 22:34   ` Chaitanya Kulkarni
2020-12-01 22:34     ` Chaitanya Kulkarni
2020-12-02  4:17     ` Damien Le Moal
2020-12-02  4:17       ` Damien Le Moal
2020-12-02  6:26       ` Chaitanya Kulkarni
2020-12-02  6:26         ` Chaitanya Kulkarni

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=20201201041416.16293-9-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: link
Be 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.