Buffer I/O Errors from Zoned NVME devices

Keith Busch kbusch at kernel.org
Mon Feb 1 12:53:06 EST 2021


On Mon, Feb 01, 2021 at 02:36:12PM +0000, Jeffrey Lien wrote:
> Christoph, Keith
> We're seeing a lot of these Buffer I/O errors with our zoned nvme devices.  One of the FW developers looked into it and had the following explanation:
> All these Reads are from the kernel during enumeration and for LBAs that are in last zone's hole hence expected to return boundary error which is getting logged by kernel.
> 
> [65281.936988] Buffer I/O error on dev nvme1n2, logical block 3800039296, async page read
> [65281.937165] blk_update_request: I/O error, dev nvme1n2, sector 3800039297 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
> [65281.937166] Buffer I/O error on dev nvme1n2, logical block 3800039297, async page read
> [65281.937335] blk_update_request: I/O error, dev nvme1n2, sector 3800039298 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
> [65281.937336] Buffer I/O error on dev nvme1n2, logical block 3800039298, async page read
> [65281.937498] blk_update_request: I/O error, dev nvme1n2, sector 3800039299 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
> 
> Are you aware of this issue and if so, do you have any recommendations on how to avoid or resolve?  

Is this from the partition scanning? We don't partition zoned devices,
so I think we can skip it. Does the following resolve the issue?

---
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1a3cdc6b1036..fafd02ab3a46 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3925,6 +3925,9 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid,
 		}
 	}
 
+	if (blk_queue_is_zoned(ns->queue))
+		disk->flags |= GENHD_FL_NO_PART_SCAN;
+
 	down_write(&ctrl->namespaces_rwsem);
 	list_add_tail(&ns->list, &ctrl->namespaces);
 	up_write(&ctrl->namespaces_rwsem);
--



More information about the Linux-nvme mailing list