aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-12-02 17:05:34 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-12-02 17:05:34 +0000
commitcf22132367a188426ac07cf1805b214dd2d0cc80 (patch)
treee5d5b056e7b2cb25102b149c65f0d51e61fcb686
parent2196b6f5dd5a07ed95d51f0d5f2f3fb20a076b13 (diff)
parentab7fe3a29ab1c6f5a1fff864e455d6d53dde62b5 (diff)
downloadqemu-cf22132367a188426ac07cf1805b214dd2d0cc80.zip
qemu-cf22132367a188426ac07cf1805b214dd2d0cc80.tar.gz
qemu-cf22132367a188426ac07cf1805b214dd2d0cc80.tar.bz2
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches # gpg: Signature made Wed 02 Dec 2015 15:57:35 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: blkdebug: silence warning under qtest qcow2: Fix potential qemu-img check crash on 32 bit hosts Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--block/blkdebug.c9
-rw-r--r--block/qcow2-refcount.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 6860a2b..dee3a0e 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -30,6 +30,7 @@
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qstring.h"
+#include "sysemu/qtest.h"
typedef struct BDRVBlkdebugState {
int state;
@@ -583,9 +584,13 @@ static void suspend_request(BlockDriverState *bs, BlkdebugRule *rule)
remove_rule(rule);
QLIST_INSERT_HEAD(&s->suspended_reqs, &r, next);
- printf("blkdebug: Suspended request '%s'\n", r.tag);
+ if (!qtest_enabled()) {
+ printf("blkdebug: Suspended request '%s'\n", r.tag);
+ }
qemu_coroutine_yield();
- printf("blkdebug: Resuming request '%s'\n", r.tag);
+ if (!qtest_enabled()) {
+ printf("blkdebug: Resuming request '%s'\n", r.tag);
+ }
QLIST_REMOVE(&r, next);
g_free(r.tag);
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 6e0e5bd..820f412 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -1244,7 +1244,7 @@ fail:
/* refcount checking functions */
-static size_t refcount_array_byte_size(BDRVQcow2State *s, uint64_t entries)
+static uint64_t refcount_array_byte_size(BDRVQcow2State *s, uint64_t entries)
{
/* This assertion holds because there is no way we can address more than
* 2^(64 - 9) clusters at once (with cluster size 512 = 2^9, and because