summaryrefslogtreecommitdiffstats
path: root/mdopen.c
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2016-10-06 11:13:09 +0200
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-10-07 17:18:32 +0200
commit21e9380b26058762a0d3cb0957c5808736d21996 (patch)
treed2e4ce16ef028f1fe6a9a586edae29234408793b /mdopen.c
parentFix RAID metadata check (diff)
downloadmdadm-21e9380b26058762a0d3cb0957c5808736d21996.tar.xz
mdadm-21e9380b26058762a0d3cb0957c5808736d21996.zip
imsm: retrieve nvme serial from sysfs
Don't rely on SCSI ioctl for reading NVMe serials - SCSI emulation for NVMe devices can be disabled in the kernel config. Instead, try to get a serial from /sys/block/nvme*/device/serial. If that fails for whatever reason (i.e. no such attribute in old kernels) - fall back to the SCSI method. This also moves some SCSI-specific code from imsm_read_serial() to scsi_get_serial(). Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Reviewed-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Reviewed-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'mdopen.c')
0 files changed, 0 insertions, 0 deletions