9ae3a8
From 47b574df6debd01336650992a1faed4bfeec4814 Mon Sep 17 00:00:00 2001
9ae3a8
From: Max Reitz <mreitz@redhat.com>
9ae3a8
Date: Sat, 13 Jun 2015 16:22:15 +0200
9ae3a8
Subject: [PATCH 21/42] qcow2: Use int64_t for in-memory reftable size
9ae3a8
9ae3a8
Message-id: <1434212556-3927-22-git-send-email-mreitz@redhat.com>
9ae3a8
Patchwork-id: 66040
9ae3a8
O-Subject: [RHEL-7.2 qemu-kvm PATCH 21/42] qcow2: Use int64_t for in-memory reftable size
9ae3a8
Bugzilla: 1129893
9ae3a8
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
9ae3a8
BZ: 1129893
9ae3a8
9ae3a8
Use int64_t for the entry count of the in-memory refcount table
9ae3a8
throughout the check functions.
9ae3a8
9ae3a8
Signed-off-by: Max Reitz <mreitz@redhat.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
(cherry picked from commit 713d9675e0e31c627d08b6a33d3a92e4b8505b40)
9ae3a8
9ae3a8
Signed-off-by: Max Reitz <mreitz@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/qcow2-refcount.c | 6 +++---
9ae3a8
 1 file changed, 3 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
9ae3a8
index 0d10865..7e2bb7d 100644
9ae3a8
--- a/block/qcow2-refcount.c
9ae3a8
+++ b/block/qcow2-refcount.c
9ae3a8
@@ -1056,7 +1056,7 @@ fail:
9ae3a8
 static void inc_refcounts(BlockDriverState *bs,
9ae3a8
                           BdrvCheckResult *res,
9ae3a8
                           uint16_t *refcount_table,
9ae3a8
-                          int refcount_table_size,
9ae3a8
+                          int64_t refcount_table_size,
9ae3a8
                           int64_t offset, int64_t size)
9ae3a8
 {
9ae3a8
     BDRVQcowState *s = bs->opaque;
9ae3a8
@@ -1099,7 +1099,7 @@ enum {
9ae3a8
  * error occurred.
9ae3a8
  */
9ae3a8
 static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res,
9ae3a8
-    uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
9ae3a8
+    uint16_t *refcount_table, int64_t refcount_table_size, int64_t l2_offset,
9ae3a8
     int flags)
9ae3a8
 {
9ae3a8
     BDRVQcowState *s = bs->opaque;
9ae3a8
@@ -1209,7 +1209,7 @@ fail:
9ae3a8
 static int check_refcounts_l1(BlockDriverState *bs,
9ae3a8
                               BdrvCheckResult *res,
9ae3a8
                               uint16_t *refcount_table,
9ae3a8
-                              int refcount_table_size,
9ae3a8
+                              int64_t refcount_table_size,
9ae3a8
                               int64_t l1_table_offset, int l1_size,
9ae3a8
                               int flags)
9ae3a8
 {
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8