Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172241007
D59625.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59625.diff
View Options
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -954,12 +954,21 @@
const struct nvme_namespace_data *nsd;
const struct nvme_controller_data *cd;
char announce_buf[80];
+ uint32_t ms;
u_int maxio;
int quirks;
nsd = nvme_get_identify_ns(periph);
cd = nvme_get_identify_cntrl(periph);
+ ms = NVMEV(NVME_NS_DATA_LBAF_MS,
+ nsd->lbaf[NVMEV(NVME_NS_DATA_FLBAS_FORMAT, nsd->flbas)]);
+ if (ms != 0) {
+ xpt_print(periph->path,
+ "lba format has %u-byte metadata, unsupported\n", ms);
+ return (CAM_REQ_CMP_ERR);
+ }
+
softc = (struct nda_softc *)malloc(sizeof(*softc), M_DEVBUF,
M_NOWAIT | M_ZERO);
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
@@ -523,6 +523,7 @@
struct nvme_completion_poll_status status;
int res;
int unit;
+ uint32_t ms;
uint8_t flbas_fmt;
uint8_t vwc_present;
@@ -574,6 +575,14 @@
return (ENXIO);
}
+ ms = NVMEV(NVME_NS_DATA_LBAF_MS, ns->data.lbaf[flbas_fmt]);
+ if (ms != 0) {
+ nvme_printf(ctrlr,
+ "nsid %d lba format %d has %u-byte metadata, unsupported\n",
+ id, flbas_fmt, ms);
+ return (ENXIO);
+ }
+
/*
* Older Intel devices (like the PC35xxx and P45xx series) advertise in
* vendor specific space an alignment that improves performance. If
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 18, 4:20 AM (4 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38899300
Default Alt Text
D59625.diff (1 KB)
Attached To
Mode
D59625: nvme: reject namespaces formatted with metadata
Attached
Detach File
Event Timeline
Log In to Comment