Blob Blame History Raw
From 47b574df6debd01336650992a1faed4bfeec4814 Mon Sep 17 00:00:00 2001
From: Max Reitz <mreitz@redhat.com>
Date: Sat, 13 Jun 2015 16:22:15 +0200
Subject: [PATCH 21/42] qcow2: Use int64_t for in-memory reftable size

Message-id: <1434212556-3927-22-git-send-email-mreitz@redhat.com>
Patchwork-id: 66040
O-Subject: [RHEL-7.2 qemu-kvm PATCH 21/42] qcow2: Use int64_t for in-memory reftable size
Bugzilla: 1129893
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

BZ: 1129893

Use int64_t for the entry count of the in-memory refcount table
throughout the check functions.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 713d9675e0e31c627d08b6a33d3a92e4b8505b40)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 block/qcow2-refcount.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 0d10865..7e2bb7d 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -1056,7 +1056,7 @@ fail:
 static void inc_refcounts(BlockDriverState *bs,
                           BdrvCheckResult *res,
                           uint16_t *refcount_table,
-                          int refcount_table_size,
+                          int64_t refcount_table_size,
                           int64_t offset, int64_t size)
 {
     BDRVQcowState *s = bs->opaque;
@@ -1099,7 +1099,7 @@ enum {
  * error occurred.
  */
 static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res,
-    uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
+    uint16_t *refcount_table, int64_t refcount_table_size, int64_t l2_offset,
     int flags)
 {
     BDRVQcowState *s = bs->opaque;
@@ -1209,7 +1209,7 @@ fail:
 static int check_refcounts_l1(BlockDriverState *bs,
                               BdrvCheckResult *res,
                               uint16_t *refcount_table,
-                              int refcount_table_size,
+                              int64_t refcount_table_size,
                               int64_t l1_table_offset, int l1_size,
                               int flags)
 {
-- 
1.8.3.1