Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nvme: ignore zone validate errors on subsequent scans
@ 2020-10-23 19:16 Keith Busch
  2020-10-23 20:34 ` Chaitanya Kulkarni
  2020-10-27  9:07 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2020-10-23 19:16 UTC (permalink / raw)
  To: linux-nvme, sagi, hch; +Cc: Keith Busch, Michael Nguyen

Revalidating nvme zoned namespaces requires IO commands, and there are
controller states that prevent IO. For example, a sanitize in progress
is required to fail all IO, but we don't want to remove a namespace
we've previously added just because the controller is in such a state.
Suppress the error in this case.

Reported-by: Michael Nguyen <michael.nguyen@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
Yet another reason zone management commands should have been in the
admin command set!

 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 95ef4943d8bd..376096bfc54a 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2125,7 +2125,7 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id)
 
 	if (blk_queue_is_zoned(ns->queue)) {
 		ret = nvme_revalidate_zones(ns);
-		if (ret)
+		if (ret && !nvme_first_scan(ns->disk))
 			return ret;
 	}
 
-- 
2.24.1


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

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

* Re: [PATCH] nvme: ignore zone validate errors on subsequent scans
  2020-10-23 19:16 [PATCH] nvme: ignore zone validate errors on subsequent scans Keith Busch
@ 2020-10-23 20:34 ` Chaitanya Kulkarni
  2020-10-27  9:07 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-10-23 20:34 UTC (permalink / raw)
  To: Keith Busch, linux-nvme, sagi, hch; +Cc: Michael Nguyen

On 10/23/20 12:22, Keith Busch wrote:
> Revalidating nvme zoned namespaces requires IO commands, and there are
> controller states that prevent IO. For example, a sanitize in progress
> is required to fail all IO, but we don't want to remove a namespace
> we've previously added just because the controller is in such a state.
> Suppress the error in this case.
>
> Reported-by: Michael Nguyen <michael.nguyen@wdc.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> Yet another reason zone management commands should have been in the
> admin command set!

Agree, I've raised this question.

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>


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

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

* Re: [PATCH] nvme: ignore zone validate errors on subsequent scans
  2020-10-23 19:16 [PATCH] nvme: ignore zone validate errors on subsequent scans Keith Busch
  2020-10-23 20:34 ` Chaitanya Kulkarni
@ 2020-10-27  9:07 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-10-27  9:07 UTC (permalink / raw)
  To: Keith Busch; +Cc: Michael Nguyen, sagi, linux-nvme, hch

Thanks,

applied to nvme-5.10.

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

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 19:16 [PATCH] nvme: ignore zone validate errors on subsequent scans Keith Busch
2020-10-23 20:34 ` Chaitanya Kulkarni
2020-10-27  9:07 ` Christoph Hellwig

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git