All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] lightnvm pull request
@ 2021-04-13 10:52 Matias Bjørling
  2021-04-13 10:52 ` [PATCH 1/4] lightnvm: use kobj_to_dev() Matias Bjørling
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Matias Bjørling @ 2021-04-13 10:52 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Matias Bjørling

Hi Jens,

Please pick up when convenient.

This PR officially deprecates the lightnvm subsystem and prepares
it to be removed from kernel 5.15 and onward.

The lightnvm subsystem has been superseeded by the recently standardized
NVMe Zoned Namespace (ZNS) Command Set specification. Together with other
advancements in NVMe, it is now possible to implement all of the features that
the original OCSSD work introduced.

Thanks for enabling me to contribute the subsystem. It has been an incredible
journey. While the subsystem itself had not had that many users outside of
academia and initial PoCs, it has been instrumental in gaining
enough mind-share in the industry, which ultimately has allowed ZNS SSDs to
emerge. Thank you!

All,

Thanks to all of you that has been contributing over the years. It
has been a pleasure working with you. I look forward to continue
working with many of you on ZNS and other emerging technologies.

Best, Matias

Chaitanya Kulkarni (1):
  lightnvm: use kobj_to_dev()

Christoph Hellwig (1):
  lightnvm: deprecated OCSSD support and schedule it for removal in
    Linux 5.15

Tian Tao (1):
  lightnvm: return the correct return value

Zhang Yunkai (1):
  lightnvm: remove duplicate include in lightnvm.h

 drivers/lightnvm/Kconfig      | 4 +++-
 drivers/lightnvm/core.c       | 4 +++-
 drivers/nvme/host/lightnvm.c  | 2 +-
 include/linux/lightnvm.h      | 2 --
 include/uapi/linux/lightnvm.h | 1 -
 5 files changed, 7 insertions(+), 6 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] lightnvm: use kobj_to_dev()
  2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
@ 2021-04-13 10:52 ` Matias Bjørling
  2021-04-13 10:52 ` [PATCH 2/4] lightnvm: return the correct return value Matias Bjørling
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Matias Bjørling @ 2021-04-13 10:52 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Chaitanya Kulkarni, Matias Bjørling

From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

This fixs coccicheck warning:

drivers/nvme//host/lightnvm.c:1243:60-61: WARNING opportunity for
kobj_to_dev()

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index b705988629f2..e3240d189093 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -1240,7 +1240,7 @@ static struct attribute *nvm_dev_attrs[] = {
 static umode_t nvm_dev_attrs_visible(struct kobject *kobj,
 				     struct attribute *attr, int index)
 {
-	struct device *dev = container_of(kobj, struct device, kobj);
+	struct device *dev = kobj_to_dev(kobj);
 	struct gendisk *disk = dev_to_disk(dev);
 	struct nvme_ns *ns = disk->private_data;
 	struct nvm_dev *ndev = ns->ndev;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] lightnvm: return the correct return value
  2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
  2021-04-13 10:52 ` [PATCH 1/4] lightnvm: use kobj_to_dev() Matias Bjørling
@ 2021-04-13 10:52 ` Matias Bjørling
  2021-04-13 10:52 ` [PATCH 3/4] lightnvm: remove duplicate include in lightnvm.h Matias Bjørling
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Matias Bjørling @ 2021-04-13 10:52 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Tian Tao, Matias Bjørling

From: Tian Tao <tiantao6@hisilicon.com>

When memdup_user returns an error, memdup_user has two different return
values, use PTR_ERR to get the correct return value.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
---
 drivers/lightnvm/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 28ddcaa5358b..42774beeba94 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -1257,7 +1257,7 @@ static long nvm_ioctl_info(struct file *file, void __user *arg)
 
 	info = memdup_user(arg, sizeof(struct nvm_ioctl_info));
 	if (IS_ERR(info))
-		return -EFAULT;
+		return PTR_ERR(info);
 
 	info->version[0] = NVM_VERSION_MAJOR;
 	info->version[1] = NVM_VERSION_MINOR;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] lightnvm: remove duplicate include in lightnvm.h
  2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
  2021-04-13 10:52 ` [PATCH 1/4] lightnvm: use kobj_to_dev() Matias Bjørling
  2021-04-13 10:52 ` [PATCH 2/4] lightnvm: return the correct return value Matias Bjørling
@ 2021-04-13 10:52 ` Matias Bjørling
  2021-04-13 10:52 ` [PATCH 4/4] lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15 Matias Bjørling
  2021-04-13 15:16 ` [PATCH 0/4] lightnvm pull request Jens Axboe
  4 siblings, 0 replies; 6+ messages in thread
From: Matias Bjørling @ 2021-04-13 10:52 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Zhang Yunkai, Matias Bjørling

From: Zhang Yunkai <zhang.yunkai@zte.com.cn>

'linux/blkdev.h' and 'uapi/linux/lightnvm.h' included in 'lightnvm.h'
is duplicated.It is also included in the 5th and 7th line.

Signed-off-by: Zhang Yunkai <zhang.yunkai@zte.com.cn>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
---
 include/linux/lightnvm.h      | 2 --
 include/uapi/linux/lightnvm.h | 1 -
 2 files changed, 3 deletions(-)

diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 1db223710b28..0908abda9c1b 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -112,10 +112,8 @@ struct nvm_dev_ops {
 
 #ifdef CONFIG_NVM
 
-#include <linux/blkdev.h>
 #include <linux/file.h>
 #include <linux/dmapool.h>
-#include <uapi/linux/lightnvm.h>
 
 enum {
 	/* HW Responsibilities */
diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h
index ead2e72e5c88..2745afd9b8fa 100644
--- a/include/uapi/linux/lightnvm.h
+++ b/include/uapi/linux/lightnvm.h
@@ -22,7 +22,6 @@
 
 #ifdef __KERNEL__
 #include <linux/const.h>
-#include <linux/ioctl.h>
 #else /* __KERNEL__ */
 #include <stdio.h>
 #include <sys/ioctl.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15
  2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
                   ` (2 preceding siblings ...)
  2021-04-13 10:52 ` [PATCH 3/4] lightnvm: remove duplicate include in lightnvm.h Matias Bjørling
@ 2021-04-13 10:52 ` Matias Bjørling
  2021-04-13 15:16 ` [PATCH 0/4] lightnvm pull request Jens Axboe
  4 siblings, 0 replies; 6+ messages in thread
From: Matias Bjørling @ 2021-04-13 10:52 UTC (permalink / raw)
  To: axboe
  Cc: linux-block, Christoph Hellwig, Javier González,
	Matias Bjørling

From: Christoph Hellwig <hch@lst.de>

Lightnvm was an innovative idea to expose more low-level control over SSDs.
But it failed to get properly standardized and remains a non-standarized
extension to NVMe that requires vendor specific quirks for a few now mostly
obsolete SSD devices.  The standardized ZNS command set for NVMe has take
over a lot of the approaches and allows for fully standardized operation.

Remove the Linux code to support open channel SSDs as the few production
deployments of the above mentioned SSDs are using userspace driver stacks
instead of the fairly limited Linux support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
---
 drivers/lightnvm/Kconfig | 4 +++-
 drivers/lightnvm/core.c  | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig
index 4c2ce210c123..04caa0f2d445 100644
--- a/drivers/lightnvm/Kconfig
+++ b/drivers/lightnvm/Kconfig
@@ -4,7 +4,7 @@
 #
 
 menuconfig NVM
-	bool "Open-Channel SSD target support"
+	bool "Open-Channel SSD target support (DEPRECATED)"
 	depends on BLOCK
 	help
 	  Say Y here to get to enable Open-channel SSDs.
@@ -15,6 +15,8 @@ menuconfig NVM
 	  If you say N, all options in this submenu will be skipped and disabled
 	  only do this if you know what you are doing.
 
+	  This code is deprecated and will be removed in Linux 5.15.
+
 if NVM
 
 config NVM_PBLK
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 42774beeba94..40a948c08a0b 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -1174,6 +1174,8 @@ int nvm_register(struct nvm_dev *dev)
 {
 	int ret, exp_pool_size;
 
+	pr_warn_once("lightnvm support is deprecated and will be removed in Linux 5.15.\n");
+
 	if (!dev->q || !dev->ops) {
 		kref_put(&dev->ref, nvm_free);
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] lightnvm pull request
  2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
                   ` (3 preceding siblings ...)
  2021-04-13 10:52 ` [PATCH 4/4] lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15 Matias Bjørling
@ 2021-04-13 15:16 ` Jens Axboe
  4 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2021-04-13 15:16 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: linux-block, Matias Bjørling

On 4/13/21 4:52 AM, Matias Bjørling wrote:
> Hi Jens,
> 
> Please pick up when convenient.
> 
> This PR officially deprecates the lightnvm subsystem and prepares
> it to be removed from kernel 5.15 and onward.
> 
> The lightnvm subsystem has been superseeded by the recently standardized
> NVMe Zoned Namespace (ZNS) Command Set specification. Together with other
> advancements in NVMe, it is now possible to implement all of the features that
> the original OCSSD work introduced.
> 
> Thanks for enabling me to contribute the subsystem. It has been an incredible
> journey. While the subsystem itself had not had that many users outside of
> academia and initial PoCs, it has been instrumental in gaining
> enough mind-share in the industry, which ultimately has allowed ZNS SSDs to
> emerge. Thank you!

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-13 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 10:52 [PATCH 0/4] lightnvm pull request Matias Bjørling
2021-04-13 10:52 ` [PATCH 1/4] lightnvm: use kobj_to_dev() Matias Bjørling
2021-04-13 10:52 ` [PATCH 2/4] lightnvm: return the correct return value Matias Bjørling
2021-04-13 10:52 ` [PATCH 3/4] lightnvm: remove duplicate include in lightnvm.h Matias Bjørling
2021-04-13 10:52 ` [PATCH 4/4] lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15 Matias Bjørling
2021-04-13 15:16 ` [PATCH 0/4] lightnvm pull request Jens Axboe

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.