File rtslib-add-nvme-support.patch of Package python-rtslib
From: David Bond <dbond@suse.com>
Date: Tue Jan 26 10:54:03 PST 2016
Subject: rtslib: Add nvme support
---
---
rtslib/utils.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/rtslib/utils.py
+++ b/rtslib/utils.py
@@ -138,6 +138,8 @@ def is_disk_partition(path):
if not regex:
regex = re.match(r'(/dev/disk/.+)(-part[1-9]+)$', path)
if not regex:
+ regex = re.match(r'(/dev/nvme[0-9]+)(n[0-9]+)(p[0-9]+)$', path)
+ if not regex:
return False
else:
if get_block_type(regex.group(1)) == 0:
@@ -342,7 +344,8 @@ def get_block_type(path):
251, # LOCAL/EXPERIMENTAL USE
252, # LOCAL/EXPERIMENTAL USE
253, # LOCAL/EXPERIMENTAL USE
- 254 # LOCAL/EXPERIMENTAL USE
+ 254, # LOCAL/EXPERIMENTAL USE
+ 259 # NVME namespaces
]
if major in type_disk_known_majors:
return 0