From nobody Thu May 2 11:38:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567176323; cv=none; d=zoho.com; s=zohoarc; b=ea5TrbojA79t+7e7B1F6N6pzpdShfDJ8EIaUxVdykrQTu11Ij4ayrnj9imqgvFunSGAAbMVJXomPPKSfcI9Lhl5SWLpHf8g9ibdzuknycdyPW6hsuivmbm7v5SVOSoJLBbrXDKGGifZU1FDdVaeDRjKsYUms9NDpALnEzvwWnFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567176323; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4XptxjdW73H3R1cNclPQ5pfbDXwiwrbROCUElvaoZkU=; b=MqZZQ2YGSlhbUYzWd42JLrVagQEgagmaM3YcUmH8e6vCPCsmtR1ZFEIwy4DjW4IzNOjZPrQRDdpWu11x1t6r7RDOI4vuhIaRjN9Sb64d6DuKJHCRGNlO8jRMiALpvBCQwrpQvX0dVEkDDyHeGOlqyv7qNQm3IdoAIPu5vrXicN4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567176323779604.9954151773815; Fri, 30 Aug 2019 07:45:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56040C05AA56; Fri, 30 Aug 2019 14:45:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23E0A5B69A; Fri, 30 Aug 2019 14:45:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C18352551B; Fri, 30 Aug 2019 14:45:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7UEjBW0024072 for ; Fri, 30 Aug 2019 10:45:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 33D3A6061E; Fri, 30 Aug 2019 14:45:11 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id B007160625 for ; Fri, 30 Aug 2019 14:45:10 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 30 Aug 2019 16:45:03 +0200 Message-Id: <3a3e521bd79055df696351de4819f6d1e695b35a.1567176198.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] qemu: block: Use correct type when creating image size JSON entries X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 30 Aug 2019 14:45:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The 'u' modifier creates a unsigned int JSON attribute but the disk size and capacity fields are unsigned long long. If the size of the created image would be more than 4GiB we'd overflow and create sub-4G image. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_block.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 66b1d116d8..e33aad4458 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -2034,7 +2034,7 @@ qemuBlockStorageSourceCreateGetFormatPropsGeneric(vir= StorageSourcePtr src, if (virJSONValueObjectCreate(&props, "s:driver", driver, "s:file", src->nodestorage, - "u:size", src->capacity, + "U:size", src->capacity, NULL) < 0) return -1; @@ -2100,7 +2100,7 @@ qemuBlockStorageSourceCreateGetFormatPropsLUKS(virSto= rageSourcePtr src, if (virJSONValueObjectAdd(luksprops, "s:driver", "luks", "s:file", src->nodestorage, - "u:size", src->capacity, + "U:size", src->capacity, NULL) < 0) return -1; @@ -2153,7 +2153,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow2(virSt= orageSourcePtr src, if (virJSONValueObjectCreate(&qcow2props, "s:driver", "qcow2", "s:file", src->nodestorage, - "u:size", src->capacity, + "U:size", src->capacity, "S:version", qcow2version, NULL) < 0) return -1; @@ -2177,7 +2177,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow(virSto= rageSourcePtr src, if (virJSONValueObjectCreate(&qcowprops, "s:driver", "qcow", "s:file", src->nodestorage, - "u:size", src->capacity, + "U:size", src->capacity, NULL) < 0) return -1; @@ -2200,7 +2200,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQed(virStor= ageSourcePtr src, if (virJSONValueObjectCreate(&qedprops, "s:driver", "qed", "s:file", src->nodestorage, - "u:size", src->capacity, + "U:size", src->capacity, NULL) < 0) return -1; @@ -2373,7 +2373,7 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorag= eSourcePtr src, "s:driver", driver, "S:filename", filename, "A:location", &location, - "u:size", src->physical, + "U:size", src->physical, NULL) < 0) return -1; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:38:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567176327; cv=none; d=zoho.com; s=zohoarc; b=an2tDaszA/xSIHXUl2nAvzhH+MF9F1qTniem5/+tUmzNF6W4LnuPsKSG2t1Lf5f+SlJcIovxmd7Ap3ECs9/Bh73pey+p6zKg2FXnpBzWZ0A00C9fzOItI7ZsozBYL9CJorlkDdGlJn4/3sRSLrvE0v+dPIOu11COWSc1tnPAygY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567176327; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ih1PFMoZ95X9MtOATV0uSGKOmIRnON4Uk4MdFPX+mpI=; b=CuEQJW+c6jG7e2VY9aU4hF+VXiGBOoSbzl9jGoq4G/d/LqtZBja+14014d1n92dDl9cNgbFcYwedZo73WaNmq4Cd/HmVrnh5y2w3XfcTrGYdZPE8HhCWr7w41wcr15Ly20gqgzhi1CgXKAqX4Byhq5ATagXAlk4chmcNs3LyrwM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567176327602396.4378955785704; Fri, 30 Aug 2019 07:45:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 28CBF302C066; Fri, 30 Aug 2019 14:45:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EED99608C1; Fri, 30 Aug 2019 14:45:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AB3732551F; Fri, 30 Aug 2019 14:45:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7UEjCeu024080 for ; Fri, 30 Aug 2019 10:45:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0704060625; Fri, 30 Aug 2019 14:45:12 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8126C6061E for ; Fri, 30 Aug 2019 14:45:11 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 30 Aug 2019 16:45:04 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] tests: qemublock: Use bigger numbers as dummy capacity/physical X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 30 Aug 2019 14:45:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Actually test that the full range is available. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemublocktest.c | 4 ++-- tests/qemublocktestdata/imagecreate/luks-encopts.json | 4 ++-- tests/qemublocktestdata/imagecreate/luks-noopts.json | 4 ++-- .../qemublocktestdata/imagecreate/network-gluster-qcow2.json | 4 ++-- tests/qemublocktestdata/imagecreate/network-rbd-qcow2.json | 4 ++-- .../qemublocktestdata/imagecreate/network-sheepdog-qcow2.json | 4 ++-- tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json | 4 ++-- tests/qemublocktestdata/imagecreate/qcow2-backing-luks.json | 4 ++-- .../qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json | 4 ++-- tests/qemublocktestdata/imagecreate/qcow2-backing-raw.json | 4 ++-- .../imagecreate/qcow2-luks-encopts-backing.json | 4 ++-- tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.json | 4 ++-- tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.json | 4 ++-- tests/qemublocktestdata/imagecreate/qcow2.json | 4 ++-- tests/qemublocktestdata/imagecreate/raw.json | 2 +- 15 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 0bc4b65449..1bf72a4615 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -420,8 +420,8 @@ testQemuImageCreate(const void *opaque) return -1; /* fake some sizes */ - src->capacity =3D 1337; - src->physical =3D 42; + src->capacity =3D UINT_MAX * 2ULL; + src->physical =3D UINT_MAX + 1ULL; if (qemuDomainValidateStorageSource(src, data->qemuCaps) < 0) return -1; diff --git a/tests/qemublocktestdata/imagecreate/luks-encopts.json b/tests/= qemublocktestdata/imagecreate/luks-encopts.json index f065ad89a7..c5ca863f5b 100644 --- a/tests/qemublocktestdata/imagecreate/luks-encopts.json +++ b/tests/qemublocktestdata/imagecreate/luks-encopts.json @@ -2,7 +2,7 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.img", - "size": 42 + "size": 4294967296 } format: @@ -15,5 +15,5 @@ format: "ivgen-hash-alg": "sha256", "driver": "luks", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/luks-noopts.json b/tests/q= emublocktestdata/imagecreate/luks-noopts.json index 1ea1948119..8a0944151d 100644 --- a/tests/qemublocktestdata/imagecreate/luks-noopts.json +++ b/tests/qemublocktestdata/imagecreate/luks-noopts.json @@ -2,7 +2,7 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.img", - "size": 42 + "size": 4294967296 } format: @@ -10,5 +10,5 @@ format: "key-secret": "0123456789ABCDEF0123456789ABCDE-encalias", "driver": "luks", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.json= b/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.json index aee7bfd401..3e35beb088 100644 --- a/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.json +++ b/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.json @@ -17,12 +17,12 @@ protocol: } ] }, - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.json b/t= ests/qemublocktestdata/imagecreate/network-rbd-qcow2.json index 56d9c0f1ed..67e2679dae 100644 --- a/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.json +++ b/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.json @@ -15,12 +15,12 @@ protocol: } ] }, - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.jso= n b/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json index b7272625a2..d86bef6bc8 100644 --- a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json +++ b/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json @@ -9,12 +9,12 @@ protocol: }, "vdi": "asdf/i.qcow2" }, - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json b/t= ests/qemublocktestdata/imagecreate/network-ssh-qcow2.json index 31416ed4fc..d58054c081 100644 --- a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json +++ b/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json @@ -8,12 +8,12 @@ protocol: "port": "1234" } }, - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/qcow2-backing-luks.json b/= tests/qemublocktestdata/imagecreate/qcow2-backing-luks.json index 63ba35dc79..5f9a800c6c 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-backing-luks.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-backing-luks.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "backing-file": "/var/lib/libvirt/images/i.img", "backing-fmt": "luks" } diff --git a/tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json= b/tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json index b9d1d97302..c10ab98c8a 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "backing-file": "nbd://example.com:1234", "backing-fmt": "raw" } diff --git a/tests/qemublocktestdata/imagecreate/qcow2-backing-raw.json b/t= ests/qemublocktestdata/imagecreate/qcow2-backing-raw.json index 8176c8dadd..eb9fb413f6 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-backing-raw.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-backing-raw.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "backing-file": "/var/lib/libvirt/images/i.img", "backing-fmt": "raw" } diff --git a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts-backing= .json b/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts-backing.json index a57617dfac..641b5e04c9 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts-backing.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts-backing.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "backing-file": "/var/lib/libvirt/images/i.qcow2", "backing-fmt": "qcow2", "encrypt": { diff --git a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.json b/= tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.json index 8796726fcb..28c85ec90b 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "encrypt": { "key-secret": "0123456789ABCDEF0123456789ABCDE-encalias", "cipher-alg": "serpent-256", diff --git a/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.json b/t= ests/qemublocktestdata/imagecreate/qcow2-luks-noopts.json index f9caaee6bb..b5063a846d 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.json +++ b/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.json @@ -2,14 +2,14 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337, + "size": 8589934590, "encrypt": { "key-secret": "0123456789ABCDEF0123456789ABCDE-encalias", "format": "luks" diff --git a/tests/qemublocktestdata/imagecreate/qcow2.json b/tests/qemublo= cktestdata/imagecreate/qcow2.json index 7142cf67b6..732763b763 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2.json +++ b/tests/qemublocktestdata/imagecreate/qcow2.json @@ -2,12 +2,12 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.qcow2", - "size": 42 + "size": 4294967296 } format: { "driver": "qcow2", "file": "0123456789ABCDEF0123456789ABCDE", - "size": 1337 + "size": 8589934590 } diff --git a/tests/qemublocktestdata/imagecreate/raw.json b/tests/qemublock= testdata/imagecreate/raw.json index 06abb25ab9..89a6c2d237 100644 --- a/tests/qemublocktestdata/imagecreate/raw.json +++ b/tests/qemublocktestdata/imagecreate/raw.json @@ -2,7 +2,7 @@ protocol: { "driver": "file", "filename": "/var/lib/libvirt/images/i.img", - "size": 42 + "size": 4294967296 } format: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:38:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567176317; cv=none; d=zoho.com; s=zohoarc; b=Nk9aIrMWDNC44yyYrbtF+dyDhioWW7YWQj8D2jHdbFuImHUz4+6d3RE1ysRHfLVyrHaAi0I6WIqCLI9op7LMbOhw/zPFLjUX6VEegjUm7cfJyPoa0Fu1AmttqFcZjMi3nWFBNNBJJjJUyl9trA2LYbpVTw89qA5wbeIS3935bFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567176317; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cyviz5Ow+y4HB0NXoP3jHfiru3cCWUVok3cAMZWiF6I=; b=ElBcQ5i3wS2JW/KF8U9+ra+j6YQosH6/RjOylswCaQd/3SRvqMIklmiYsaSuqqaHkoC/BHRbL9yL9sTwxrIT3KG66Fsf+aJAlAupWooKyLigF+6Obkvs4UsQUAHZ/iEAv3fC7HkoOKPiOO6jcYWmjo1h61lSEjp6w6cSi12gbqY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567176317165296.9726516654895; Fri, 30 Aug 2019 07:45:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F53A60177; Fri, 30 Aug 2019 14:45:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 621765C1D4; Fri, 30 Aug 2019 14:45:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1F84D180B536; Fri, 30 Aug 2019 14:45:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7UEjCg6024087 for ; Fri, 30 Aug 2019 10:45:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBFA45F7E6; Fri, 30 Aug 2019 14:45:12 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55A216061E for ; Fri, 30 Aug 2019 14:45:12 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 30 Aug 2019 16:45:05 +0200 Message-Id: <29748041101e2cb372ef7f34953b90ff8fa31801.1567176198.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] qemu: monitor: Fix formatting of 'offset' in qemuMonitorJSONSaveMemory X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 30 Aug 2019 14:45:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The offset is unsigned long long thus 'U' must be used. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index da1e89dded..e4404f0199 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -3123,7 +3123,7 @@ static int qemuMonitorJSONSaveMemory(qemuMonitorPtr m= on, int ret =3D -1; virJSONValuePtr cmd =3D qemuMonitorJSONMakeCommand(cmdtype, "U:val", offset, - "u:size", length, + "U:size", length, "s:filename", path, NULL); virJSONValuePtr reply =3D NULL; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list