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