Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173719259
D59152.id185713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
867 B
Referenced Files
None
Subscribers
None
D59152.id185713.diff
View Options
diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c
--- a/sys/dev/nvme/nvme_ns.c
+++ b/sys/dev/nvme/nvme_ns.c
@@ -602,8 +602,10 @@
* cdev may have already been created, if we are reconstructing the
* namespace after a controller-level reset.
*/
- if (ns->cdev != NULL)
+ if (ns->cdev != NULL) {
+ ns->cdev->si_iosize_max = ctrlr->max_xfer_size;
return (0);
+ }
/*
* Namespace IDs start at 1, so we need to subtract 1 to create a
@@ -623,6 +625,11 @@
ns->cdev->si_drv2 = make_dev_alias(ns->cdev, "%sns%d",
device_get_nameunit(ctrlr->dev), ns->id);
ns->cdev->si_flags |= SI_UNMAPPED;
+ /*
+ * Limit physio requests to the controller's maximum transfer size.
+ * The qpair payload DMA tag is constructed with the same limit.
+ */
+ ns->cdev->si_iosize_max = ctrlr->max_xfer_size;
ns->flags |= NVME_NS_ALIVE;
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 28, 10:38 PM (11 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37245107
Default Alt Text
D59152.id185713.diff (867 B)
Attached To
Mode
D59152: nvme: limit namespace character-device I/O size
Attached
Detach File
Event Timeline
Log In to Comment