3e5111
From 911438df6c652e377f80712c67da90aed91444b7 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <911438df6c652e377f80712c67da90aed91444b7@dist-git>
3e5111
From: John Ferlan <jferlan@redhat.com>
3e5111
Date: Wed, 26 Apr 2017 08:41:09 -0400
3e5111
Subject: [PATCH] disk: Force usage of parted when checking disk format for
3e5111
 "bsd"
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1439132
3e5111
3e5111
Add "bsd" to the list of format types to not checked during blkid
3e5111
processing even though it supposedly knows the format - for some
3e5111
(now unknown) reason it's returning partition table not found. So
3e5111
let's just let PARTED handle "bsd" too.
3e5111
3e5111
Signed-off-by: John Ferlan <jferlan@redhat.com>
3e5111
(cherry picked from commit 98f424d5038b362d1b62549930d0b9253106bdca)
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/storage/storage_util.c | 6 ++++--
3e5111
 1 file changed, 4 insertions(+), 2 deletions(-)
3e5111
3e5111
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
3e5111
index 7a458b828..adec9ab6f 100644
3e5111
--- a/src/storage/storage_util.c
3e5111
+++ b/src/storage/storage_util.c
3e5111
@@ -3002,10 +3002,12 @@ virStorageBackendBLKIDFindPart(blkid_probe probe,
3e5111
 
3e5111
     /* A blkid_known_pttype on "dvh" and "pc98" returns a failure;
3e5111
      * however, the blkid_do_probe for "dvh" returns "sgi" and
3e5111
-     * for "pc98" it returns "dos". So since those will cause problems
3e5111
+     * for "pc98" it returns "dos". Although "bsd" is recognized,
3e5111
+     * it seems that the parted created partition table is not being
3e5111
+     * properly recogized. Since each of these will cause problems
3e5111
      * with startup comparison, let's just treat them as UNKNOWN causing
3e5111
      * the caller to fallback to using PARTED */
3e5111
-    if (STREQ(format, "dvh") || STREQ(format, "pc98"))
3e5111
+    if (STREQ(format, "dvh") || STREQ(format, "pc98") || STREQ(format, "bsd"))
3e5111
         return VIR_STORAGE_BLKID_PROBE_UNKNOWN;
3e5111
 
3e5111
     /* Make sure we're doing a partitions probe from the start */
3e5111
-- 
3e5111
2.12.2
3e5111