diff options
author | Brett Mastbergen <bmastbergen@untangle.com> | 2019-10-02 10:28:16 -0400 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-12-23 00:22:06 +0100 |
commit | 9e2e48ff31cea669cfc9c1476f49b815ea9ac1b1 (patch) | |
tree | 15532a58e45a1ba9470de39c566ad84678606941 /tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch | |
parent | dc34c695c4faa46efc6e2367a2ba06a47caa4840 (diff) | |
download | upstream-9e2e48ff31cea669cfc9c1476f49b815ea9ac1b1.tar.gz upstream-9e2e48ff31cea669cfc9c1476f49b815ea9ac1b1.tar.bz2 upstream-9e2e48ff31cea669cfc9c1476f49b815ea9ac1b1.zip |
tools: qemu: Add patches to support adapter_type and monolithicFlat
Its way more trouble to update this to a newer version of qemu than it
is to backport the two additional features we need.
Signed-off-by: Brett Mastbergen <bmastbergen@untangle.com>
Diffstat (limited to 'tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch')
-rw-r--r-- | tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch b/tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch new file mode 100644 index 0000000000..b228236517 --- /dev/null +++ b/tools/qemu/patches/0007-VMDK-flush-multiple-extents.patch @@ -0,0 +1,35 @@ +From 49885608e66c1e76a2b715fb36fd2f27f73e5202 Mon Sep 17 00:00:00 2001 +From: Fam Zheng <famcool@gmail.com> +Date: Tue, 12 Jul 2011 19:56:33 +0800 +Subject: [PATCH 07/12] VMDK: flush multiple extents + +Flush all the file that referenced by the image. + +Signed-off-by: Fam Zheng <famcool@gmail.com> +Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> +Signed-off-by: Kevin Wolf <kwolf@redhat.com> +--- + block/vmdk.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/block/vmdk.c ++++ b/block/vmdk.c +@@ -1072,7 +1072,17 @@ static void vmdk_close(BlockDriverState + + static int vmdk_flush(BlockDriverState *bs) + { +- return bdrv_flush(bs->file); ++ int i, ret, err; ++ BDRVVmdkState *s = bs->opaque; ++ ++ ret = bdrv_flush(bs->file); ++ for (i = 0; i < s->num_extents; i++) { ++ err = bdrv_flush(s->extents[i].file); ++ if (err < 0) { ++ ret = err; ++ } ++ } ++ return ret; + } + + |