public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
@ 2022-03-15 14:51 Christoph Hellwig
  2022-03-15 15:23 ` Keith Busch
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2022-03-15 14:51 UTC (permalink / raw)
  To: kbusch, sagi; +Cc: linux-nvme

Start warning about exposing a namespace as multiple block devices,
and set a fixed deprecation release.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/loop.c     | 1 +
 drivers/nvme/host/core.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 8fb89d0624fc5..e733c48de2e90 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2092,6 +2092,7 @@ static void loop_remove(struct loop_device *lo)
 	del_gendisk(lo->lo_disk);
 	blk_cleanup_disk(lo->lo_disk);
 	blk_mq_free_tag_set(&lo->tag_set);
+
 	mutex_lock(&loop_ctl_mutex);
 	idr_remove(&loop_index_idr, lo->lo_number);
 	mutex_unlock(&loop_ctl_mutex);
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index fd9878671d734..75f7c53a67811 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3879,6 +3879,14 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
 					nsid);
 			goto out_put_ns_head;
 		}
+
+		if (!multipath && !list_empty(&head->list)) {
+			dev_warn(ctrl->device,
+				"Found shared namespace %d, but multipathing not supported.\n",
+				nsid);
+			dev_warn_once(ctrl->device,
+				"Support for shared namespaces without CONFIG_NVME_MULTIPATH is deprecated and will be removed in Linux 6.0\n.");
+		}
 	}
 
 	list_add_tail_rcu(&ns->siblings, &head->list);
-- 
2.30.2



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

* Re: [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
  2022-03-15 14:51 [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH Christoph Hellwig
@ 2022-03-15 15:23 ` Keith Busch
  2022-03-15 15:40   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2022-03-15 15:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: sagi, linux-nvme

On Tue, Mar 15, 2022 at 03:51:41PM +0100, Christoph Hellwig wrote:
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 8fb89d0624fc5..e733c48de2e90 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -2092,6 +2092,7 @@ static void loop_remove(struct loop_device *lo)
>  	del_gendisk(lo->lo_disk);
>  	blk_cleanup_disk(lo->lo_disk);
>  	blk_mq_free_tag_set(&lo->tag_set);
> +
>  	mutex_lock(&loop_ctl_mutex);
>  	idr_remove(&loop_index_idr, lo->lo_number);
>  	mutex_unlock(&loop_ctl_mutex);

This unrelated change sneaked into your patch. :)

> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index fd9878671d734..75f7c53a67811 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -3879,6 +3879,14 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
>  					nsid);
>  			goto out_put_ns_head;
>  		}
> +
> +		if (!multipath && !list_empty(&head->list)) {
> +			dev_warn(ctrl->device,
> +				"Found shared namespace %d, but multipathing not supported.\n",
> +				nsid);
> +			dev_warn_once(ctrl->device,
> +				"Support for shared namespaces without CONFIG_NVME_MULTIPATH is deprecated and will be removed in Linux 6.0\n.");
> +		}

The recent release pattern suggests 5.20 will be the last of the 5.x tags
before seeing 6.0, but my understanding is that's at the discretion of Chief
Penguin. Unless you know already, perhaps warning with 5.21 is more clear that
removing this capability happens after 3 more releases.


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

* Re: [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
  2022-03-15 15:23 ` Keith Busch
@ 2022-03-15 15:40   ` Christoph Hellwig
  2022-03-16 15:12     ` Keith Busch
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2022-03-15 15:40 UTC (permalink / raw)
  To: Keith Busch; +Cc: Christoph Hellwig, sagi, linux-nvme

On Tue, Mar 15, 2022 at 09:23:40AM -0600, Keith Busch wrote:
> On Tue, Mar 15, 2022 at 03:51:41PM +0100, Christoph Hellwig wrote:
> > diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> > index 8fb89d0624fc5..e733c48de2e90 100644
> > --- a/drivers/block/loop.c
> > +++ b/drivers/block/loop.c
> > @@ -2092,6 +2092,7 @@ static void loop_remove(struct loop_device *lo)
> >  	del_gendisk(lo->lo_disk);
> >  	blk_cleanup_disk(lo->lo_disk);
> >  	blk_mq_free_tag_set(&lo->tag_set);
> > +
> >  	mutex_lock(&loop_ctl_mutex);
> >  	idr_remove(&loop_index_idr, lo->lo_number);
> >  	mutex_unlock(&loop_ctl_mutex);
> 
> This unrelated change sneaked into your patch. :)

Ooops.

> The recent release pattern suggests 5.20 will be the last of the 5.x tags
> before seeing 6.0, but my understanding is that's at the discretion of Chief
> Penguin. Unless you know already, perhaps warning with 5.21 is more clear that
> removing this capability happens after 3 more releases.

Sounds good to me - we are not in a crazy urge right now, but we
need to settle this eventually.


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

* Re: [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
  2022-03-15 15:40   ` Christoph Hellwig
@ 2022-03-16 15:12     ` Keith Busch
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2022-03-16 15:12 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: sagi, linux-nvme

BTW, I don't think the legacy multipath should be supported going forward, so
I'm okay with deprecating it:

Acked-by: Keith Busch <kbusch@kernel.org>


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-15 14:51 [PATCH] nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH Christoph Hellwig
2022-03-15 15:23 ` Keith Busch
2022-03-15 15:40   ` Christoph Hellwig
2022-03-16 15:12     ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox