Blame SOURCES/kvm-qcow2-Array-assigning-options-to-OL-check-bits.patch

218e99
From 154566a3a7e0ef3a32650952a79031c8e5c5489c Mon Sep 17 00:00:00 2001
218e99
From: Max Reitz <mreitz@redhat.com>
218e99
Date: Mon, 4 Nov 2013 22:32:32 +0100
218e99
Subject: [PATCH 39/87] qcow2: Array assigning options to OL check bits
218e99
218e99
RH-Author: Max Reitz <mreitz@redhat.com>
218e99
Message-id: <1383604354-12743-42-git-send-email-mreitz@redhat.com>
218e99
Patchwork-id: 55341
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH 41/43] qcow2: Array assigning options to OL check bits
218e99
Bugzilla: 1004347
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
218e99
RH-Acked-by: Fam Zheng <famz@redhat.com>
218e99
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
218e99
218e99
BZ: 1004347
218e99
218e99
Add an array which assigns the option string to its corresponding
218e99
overlap check bit.
218e99
218e99
Signed-off-by: Max Reitz <mreitz@redhat.com>
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
(cherry picked from commit 4092e99d935fe26fd53631cc9e170f9a19e3ee4a)
218e99
218e99
Signed-off-by: Max Reitz <mreitz@redhat.com>
218e99
---
218e99
 block/qcow2.c | 11 +++++++++++
218e99
 1 file changed, 11 insertions(+)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 block/qcow2.c |   11 +++++++++++
218e99
 1 files changed, 11 insertions(+), 0 deletions(-)
218e99
218e99
diff --git a/block/qcow2.c b/block/qcow2.c
218e99
index c47286f..b6f300d 100644
218e99
--- a/block/qcow2.c
218e99
+++ b/block/qcow2.c
218e99
@@ -404,6 +404,17 @@ static QemuOptsList qcow2_runtime_opts = {
218e99
     },
218e99
 };
218e99
 
218e99
+static const char *overlap_bool_option_names[QCOW2_OL_MAX_BITNR] = {
218e99
+    [QCOW2_OL_MAIN_HEADER_BITNR]    = QCOW2_OPT_OVERLAP_MAIN_HEADER,
218e99
+    [QCOW2_OL_ACTIVE_L1_BITNR]      = QCOW2_OPT_OVERLAP_ACTIVE_L1,
218e99
+    [QCOW2_OL_ACTIVE_L2_BITNR]      = QCOW2_OPT_OVERLAP_ACTIVE_L2,
218e99
+    [QCOW2_OL_REFCOUNT_TABLE_BITNR] = QCOW2_OPT_OVERLAP_REFCOUNT_TABLE,
218e99
+    [QCOW2_OL_REFCOUNT_BLOCK_BITNR] = QCOW2_OPT_OVERLAP_REFCOUNT_BLOCK,
218e99
+    [QCOW2_OL_SNAPSHOT_TABLE_BITNR] = QCOW2_OPT_OVERLAP_SNAPSHOT_TABLE,
218e99
+    [QCOW2_OL_INACTIVE_L1_BITNR]    = QCOW2_OPT_OVERLAP_INACTIVE_L1,
218e99
+    [QCOW2_OL_INACTIVE_L2_BITNR]    = QCOW2_OPT_OVERLAP_INACTIVE_L2,
218e99
+};
218e99
+
218e99
 static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
218e99
                       Error **errp)
218e99
 {
218e99
-- 
218e99
1.7.1
218e99