[master 4/7] Create cached LVs before non-cached LVs
vpodzime
installerbot-noreply at redhat.com
Fri Jul 31 11:33:56 UTC 2015
From: Vratislav Podzimek <vpodzime at redhat.com>
In order to minimize the risk of non-cached LVs taking space on fast PVs that
should be used by caches.
---
blivet/deviceaction.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index 4fd6df2..7c14aac 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -26,7 +26,7 @@
from . import udev
from .util import get_current_entropy
from .devices import StorageDevice
-from .devices import PartitionDevice
+from .devices import PartitionDevice, LVMLogicalVolumeDevice
from .formats import getFormat, luks
from parted import partitionFlag, PARTITION_LBA
from .i18n import _, N_
@@ -334,6 +334,14 @@ def requires(self, action):
otherNum = action.device.partedPartition.number
if selfNum > otherNum:
rc = True
+ elif (action.isCreate and action.isDevice and
+ isinstance(self.device, LVMLogicalVolumeDevice) and
+ isinstance(action.device, LVMLogicalVolumeDevice) and
+ self.device.vg == action.device.vg):
+ # create cached LVs before non-cached LVs so that fast cache space
+ # is not taken by non-cached LVs
+ if not self.device.cached and action.device.cached:
+ rc = True
elif (action.isAdd and action.container == self.container):
rc = True
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/1cb3854196605e65a5ab4807f79c7287686a1714
More information about the anaconda-patches
mailing list