Re: [PATCH] imsm: retrieve nvme serial from sysfs

From
Jes Sorensen <hidden>
Date
2016-10-07 15:19:00
Artur Paszkiewicz [off-list ref] writes:
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 <redacted>
Reviewed-by: Tomasz Majchrzak <redacted>
Reviewed-by: Alexey Obitotskiy <redacted>
---
 sg_io.c       | 23 +++++++++++++++++++----
 super-intel.c | 46 +++++++++++++++++++++++++++-------------------
 2 files changed, 46 insertions(+), 23 deletions(-)
Hi Artur,

Looks quite reasonable - applied!

Thanks,
Jes
Thread (1 message) 1 message, 1 author, last reply 2016-10-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help