zipl: Extend disk_get_info() to recognize NVMe disks

Until now, NVMe disks were handled by zipl as SCSI disks. To support
NVMe stand-alone dump, it became necessary to further differentiate between
both types of disks.

There are two cases that must be handled:
1. A non-device-mapper device is a NVMe disk if it is assigned to the blkext
   device driver.
2. A device-mapper disk is a NVMe disk if the ioctl NVME_IOCTL_ID succeeds.
   This case is necessary to properly recognize NVMe disks which are
   DM devices and, therefore, not directly handled by the blkext device
   driver.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Acked-by: Stefan Haberland <sth@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Alexander Egorenkov
2021-08-18 08:24:54 +02:00
committed by Jan Höppner
parent dc49b4fcf0
commit 844058bf4d
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -88,6 +88,7 @@ struct disk_info {
char* drv_name;
source_t source;
definition_t targetbase;
int is_nvme;
};
struct file_range {