b04db7f630
Conditionalize the Python 2 subpackage and don't build it on EL > 7 and Fedora > 28 (mhroncok) Add experimental support for NVDIMM. (vtrefny)
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
From d4792dd0d2824eedbcf8cd8d28434ed8f6e938dc Mon Sep 17 00:00:00 2001
|
|
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
Date: Tue, 13 Mar 2018 14:46:32 +0100
|
|
Subject: [PATCH 7/7] Add 'nvdimm' tag for NVDIMM namespaces
|
|
|
|
---
|
|
blivet/devices/disk.py | 4 ++++
|
|
blivet/devices/lib.py | 1 +
|
|
2 files changed, 5 insertions(+)
|
|
|
|
diff --git a/blivet/devices/disk.py b/blivet/devices/disk.py
|
|
index dc796cf0..9021126c 100644
|
|
--- a/blivet/devices/disk.py
|
|
+++ b/blivet/devices/disk.py
|
|
@@ -692,6 +692,10 @@ class NVDIMMNamespaceDevice(DiskDevice):
|
|
|
|
DiskDevice.__init__(self, device, **kwargs)
|
|
|
|
+ self._clear_local_tags()
|
|
+ self.tags.add(Tags.local)
|
|
+ self.tags.add(Tags.nvdimm)
|
|
+
|
|
def __repr__(self):
|
|
s = DiskDevice.__repr__(self)
|
|
s += (" mode = %(mode)s devname = %(devname)s" %
|
|
diff --git a/blivet/devices/lib.py b/blivet/devices/lib.py
|
|
index 70b769a4..021f2cfd 100644
|
|
--- a/blivet/devices/lib.py
|
|
+++ b/blivet/devices/lib.py
|
|
@@ -31,6 +31,7 @@ LINUX_SECTOR_SIZE = Size(512)
|
|
class Tags(str, Enum):
|
|
"""Tags that describe various classes of disk."""
|
|
local = 'local'
|
|
+ nvdimm = 'nvdimm'
|
|
remote = 'remote'
|
|
removable = 'removable'
|
|
ssd = 'ssd'
|
|
--
|
|
2.14.3
|
|
|