summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@intel.com>2020-11-04 10:01:28 +0100
committerJes Sorensen <jsorensen@fb.com>2020-11-26 00:09:47 +0100
commita8f3cfd54e45c8aabc4a99cdc92b6b9080b26607 (patch)
tree95ab151d80a92e9fb32c394494348aeca0d5606e /super-intel.c
parentMonitor: don't use default modes when creating a file (diff)
downloadmdadm-a8f3cfd54e45c8aabc4a99cdc92b6b9080b26607.tar.xz
mdadm-a8f3cfd54e45c8aabc4a99cdc92b6b9080b26607.zip
imsm: limit support to first NVMe namespace
Due to metadata limitations NVMe multinamespace support has to be removed. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index 95f4eaf8..715febf7 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2364,7 +2364,9 @@ static int print_nvme_info(struct sys_dev *hba)
continue;
if (path_attached_to_hba(rp, hba->path)) {
fd = open_dev(ent->d_name);
- if (fd < 0) {
+ if (!imsm_is_nvme_supported(fd, 0)) {
+ if (fd >= 0)
+ close(fd);
free(rp);
continue;
}
@@ -5868,6 +5870,13 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
snprintf(controller_path, PATH_MAX-1, "%s/device", devpath);
free(devpath);
+ if (!imsm_is_nvme_supported(dd->fd, 1)) {
+ if (dd->devname)
+ free(dd->devname);
+ free(dd);
+ return 1;
+ }
+
if (devpath_to_vendor(controller_path) == 0x8086) {
/*
* If Intel's NVMe drive has serial ended with