diff options
author | Keith Busch <kbusch@kernel.org> | 2020-10-23 12:16:28 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-27 09:58:42 +0100 |
commit | 8685699c28d7452ff06d62b4692df985eb7301f0 (patch) | |
tree | 4c8fb501da65955cb32b5056f49a106028d13a9e /drivers/nvme/host | |
parent | f255c19b3ab46d3cad3b1b2e1036f4c926cb1d0c (diff) | |
download | lwn-8685699c28d7452ff06d62b4692df985eb7301f0.tar.gz lwn-8685699c28d7452ff06d62b4692df985eb7301f0.zip |
nvme: ignore zone validate errors on subsequent scans
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>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |