Blame SOURCES/kvm-qcow2-Avoid-duplication-in-setting-the-refcount-cach.patch

7711c0
From 7eca8ae696c2f3be102eef0a0e1bd0e6f24129cb Mon Sep 17 00:00:00 2001
7711c0
From: Kevin Wolf <kwolf@redhat.com>
7711c0
Date: Tue, 19 Feb 2019 17:00:17 +0100
7711c0
Subject: [PATCH 16/23] qcow2: Avoid duplication in setting the refcount cache
7711c0
 size
7711c0
7711c0
RH-Author: Kevin Wolf <kwolf@redhat.com>
7711c0
Message-id: <20190219170023.27826-8-kwolf@redhat.com>
7711c0
Patchwork-id: 84547
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 07/13] qcow2: Avoid duplication in setting the refcount cache size
7711c0
Bugzilla: 1656913
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Leonid Bloch <lbloch@janustech.com>
7711c0
7711c0
The refcount cache size does not need to be set to its minimum value in
7711c0
read_cache_sizes(), as it is set to at least its minimum value in
7711c0
qcow2_update_options_prepare().
7711c0
7711c0
Signed-off-by: Leonid Bloch <lbloch@janustech.com>
7711c0
Reviewed-by: Alberto Garcia <berto@igalia.com>
7711c0
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
(cherry picked from commit 657ada52abb85140e56949f522ecec527b256450)
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/qcow2.c | 5 ++---
7711c0
 1 file changed, 2 insertions(+), 3 deletions(-)
7711c0
7711c0
diff --git a/block/qcow2.c b/block/qcow2.c
7711c0
index 3859112..f3b2860 100644
7711c0
--- a/block/qcow2.c
7711c0
+++ b/block/qcow2.c
7711c0
@@ -830,10 +830,9 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts,
7711c0
                                  (uint64_t)DEFAULT_L2_CACHE_CLUSTERS
7711c0
                                  * s->cluster_size);
7711c0
         }
7711c0
-        if (!refcount_cache_size_set) {
7711c0
-            *refcount_cache_size = min_refcount_cache;
7711c0
-        }
7711c0
     }
7711c0
+    /* l2_cache_size and refcount_cache_size are ensured to have at least
7711c0
+     * their minimum values in qcow2_update_options_prepare() */
7711c0
 
7711c0
     if (*l2_cache_entry_size < (1 << MIN_CLUSTER_BITS) ||
7711c0
         *l2_cache_entry_size > s->cluster_size ||
7711c0
-- 
7711c0
1.8.3.1
7711c0