[qemu] Actually missing files
Cole Robinson
crobinso at fedoraproject.org
Tue Dec 3 11:56:05 UTC 2013
commit 46c39e954f1fde10f6ebadb1586f34d3546ae792
Author: Cole Robinson <crobinso at redhat.com>
Date: Tue Dec 3 06:54:38 2013 -0500
Actually missing files
.gitignore | 1 +
...ose-backing-file-early-in-bdrv_img_create.patch | 35 ++++++++++++++++++++
sources | 2 +-
3 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8938ae8..7da4d22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ qemu-kvm-0.13.0-25fdf4a.tar.gz
/qemu-1.6.0.tar.bz2
/qemu-1.6.1.tar.bz2
/qemu-1.7.0-rc1.tar.bz2
+/qemu-1.7.0.tar.bz2
diff --git a/0101-block-Close-backing-file-early-in-bdrv_img_create.patch b/0101-block-Close-backing-file-early-in-bdrv_img_create.patch
new file mode 100644
index 0000000..2803a33
--- /dev/null
+++ b/0101-block-Close-backing-file-early-in-bdrv_img_create.patch
@@ -0,0 +1,35 @@
+From f2b896fa48272c26445e17b59a365fcaea808e0e Mon Sep 17 00:00:00 2001
+From: Max Reitz <mreitz at redhat.com>
+Date: Fri, 29 Nov 2013 21:41:29 +0100
+Subject: [PATCH] block: Close backing file early in bdrv_img_create
+
+Leaving the backing file open although it is not needed anymore can
+cause problems if it is opened through a block driver which allows
+exclusive access only and if the create function of the block driver
+used for the top image (the one being created) tries to close and reopen
+the image file (which will include opening the backing file a second
+time).
+
+In particular, this will happen with a backing file opened through
+qemu-nbd and using qcow2 as the top image file format (which reopens the
+image to flush it to disk).
+
+Signed-off-by: Max Reitz <mreitz at redhat.com>
+---
+ block.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/block.c b/block.c
+index 382ea71..6d571ad 100644
+--- a/block.c
++++ b/block.c
+@@ -4608,6 +4608,9 @@ void bdrv_img_create(const char *filename, const char *fmt,
+
+ snprintf(buf, sizeof(buf), "%" PRId64, size);
+ set_option_parameter(param, BLOCK_OPT_SIZE, buf);
++
++ bdrv_unref(bs);
++ bs = NULL;
+ } else {
+ error_setg(errp, "Image creation needs a size parameter");
+ goto out;
diff --git a/sources b/sources
index 0eec911..52b8f46 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4cd5d82632335e0a586c77725ef0547d qemu-1.7.0-rc1.tar.bz2
+32893941d40d052a5e649efcf06aca06 qemu-1.7.0.tar.bz2
More information about the scm-commits
mailing list