Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143837640
D51393.id158700.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
814 B
Referenced Files
None
Subscribers
None
D51393.id158700.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
@@ -562,16 +562,14 @@
if (ns->data.nsze == 0)
return (ENXIO);
- flbas_fmt = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, ns->data.flbas);
-
/*
- * Note: format is a 0-based value, so > is appropriate here,
- * not >=.
+ * Check the validity of the format specified. Note: format is a 0-based
+ * value, so > is appropriate here, not >=.
*/
+ flbas_fmt = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, ns->data.flbas);
if (flbas_fmt > ns->data.nlbaf) {
- nvme_printf(ctrlr,
- "lba format %d exceeds number supported (%d)\n",
- flbas_fmt, ns->data.nlbaf + 1);
+ nvme_printf(ctrlr, "nsid %d lba format %d invalid (> %d)\n",
+ id, flbas_fmt, ns->data.nlbaf + 1);
return (ENXIO);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 7:44 PM (5 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28406677
Default Alt Text
D51393.id158700.diff (814 B)
Attached To
Mode
D51393: nvme: Improve error message for invalid format value
Attached
Detach File
Event Timeline
Log In to Comment