[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 5/5] booty changes for iswmd



Hans de Goede wrote:
Hi,

Comments inline.


Subject: [PATCH 5/5] booty changes for iswmd

---
  booty/util.py |    4 +++-
  booty/x86.py  |   11 +++++++++--
  2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/booty/util.py b/booty/util.py
index 74ba561..ddc2a51 100644
--- a/booty/util.py
+++ b/booty/util.py
@@ -1,11 +1,13 @@
  import string
+from flags import flags

  def getDiskPart(dev, storage):
      path = storage.devicetree.getDeviceByName(dev).path[5:]
      cut = len(dev)
      if (path.startswith('rd/') or path.startswith('ida/') or
              path.startswith('cciss/') or path.startswith('sx8/') or
-            path.startswith('mapper/') or path.startswith('mmcblk')):
+            path.startswith('mapper/') or path.startswith('mmcblk') or
+            (path.startswith('md') and (flags.cmdline.has_key("iswmd")))):
          if dev[-2] == 'p':
              cut = -1
          elif dev[-3] == 'p':

We may want to support partitionable md in general in the future so I don't
think the flags.cmdline.has_key("iswmd") check here is needed.

All md arrays are now partitionable by default since 2.6.28 where Tejun added block device extended minor support.

diff --git a/booty/x86.py b/booty/x86.py
index 84d2625..19ccbc8 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -4,6 +4,7 @@ import string
  from booty import BootyNoKernelWarning
  from util import getDiskPart
  from bootloaderInfo import *
+from flags import flags
  import checkbootloader
  import iutil
  import rhpl
@@ -54,6 +55,9 @@ class x86BootloaderInfo(efiBootloaderInfo):
          if path.startswith("mapper/luks-"):
              return []

+        if flags.cmdline.has_key("iswmd"):
+            return [device]
+
          if path.startswith('md'):
              bootable = 0
              parts = checkbootloader.getRaidDisks(device, self.storage,

Thus hunk seems wrong, as it will make the "return [device]" happen for
every device if the flag is present, what if I'm doing an install with
this flag, but not booting from an md isw raid set ?

We also need to consider the case where the user has disabled raid support in the bios, but the metadata and the 'iswmd' command line parameter still exist. I would expect that the OS ignores raid arrays in that case. Currently the bios-raid-enabled state can be determined by "mdadm --detail-platform -e imsm" returning 'true'.

Regards,
Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]