Commit b3c58fcd authored by Jens Axboe's avatar Jens Axboe

Merge branch 'nvme-5.8' of git://git.infradead.org/nvme into block-5.8

Pull NVMe fixes from Christoph.

* 'nvme-5.8' of git://git.infradead.org/nvme:
  nvme: fix a crash in nvme_mpath_add_disk
  nvme: fix identify error status silent ignore
parents e7eea44e 72d44711
...@@ -1116,10 +1116,16 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid, ...@@ -1116,10 +1116,16 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
dev_warn(ctrl->device, dev_warn(ctrl->device,
"Identify Descriptors failed (%d)\n", status); "Identify Descriptors failed (%d)\n", status);
/* /*
* Don't treat an error as fatal, as we potentially already * Don't treat non-retryable errors as fatal, as we potentially
* have a NGUID or EUI-64. * already have a NGUID or EUI-64. If we failed with DNR set,
* we want to silently ignore the error as we can still
* identify the device, but if the status has DNR set, we want
* to propagate the error back specifically for the disk
* revalidation flow to make sure we don't abandon the
* device just because of a temporal retry-able error (such
* as path of transport errors).
*/ */
if (status > 0 && !(status & NVME_SC_DNR)) if (status > 0 && (status & NVME_SC_DNR))
status = 0; status = 0;
goto free_data; goto free_data;
} }
......
...@@ -672,10 +672,11 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id) ...@@ -672,10 +672,11 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
} }
if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) { if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) {
struct backing_dev_info *info = struct gendisk *disk = ns->head->disk;
ns->head->disk->queue->backing_dev_info;
info->capabilities |= BDI_CAP_STABLE_WRITES; if (disk)
disk->queue->backing_dev_info->capabilities |=
BDI_CAP_STABLE_WRITES;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment