[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] e88ae2: block: Fix bdrv_is_allocated() for sh
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] e88ae2: block: Fix bdrv_is_allocated() for short backing f... |
Date: |
Thu, 22 May 2014 07:30:06 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: e88ae2264d93f98e4b656fa76555c745abe57684
https://github.com/qemu/qemu/commit/e88ae2264d93f98e4b656fa76555c745abe57684
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block.c
M include/block/block.h
Log Message:
-----------
block: Fix bdrv_is_allocated() for short backing files
bdrv_is_allocated() shouldn't return true for sectors that are
unallocated, but after the end of a short backing file, even though
such sectors are (correctly) marked as containing zeros.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Commit: 395071a76328189f50c778f4dee6dabb90503dd9
https://github.com/qemu/qemu/commit/395071a76328189f50c778f4dee6dabb90503dd9
Author: Mike Day <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M qemu-img.c
Log Message:
-----------
Remove g_sequence_lookup from qemu-img help function
g_sequence_lookup is not supported by glib < 2.28. The usage
of g_sequence_lookup is not essential in this context (it's a
safeguard against duplicate values in the help message).
Removing the call enables the build on all platforms and
does not change the operation of the help function.
Signed-off-by: Mike Day <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 6906046169ffa9d829beeeaafe1fadeba51669fb
https://github.com/qemu/qemu/commit/6906046169ffa9d829beeeaafe1fadeba51669fb
Author: Jeff Cody <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/vhdx.c
Log Message:
-----------
block: vhdx - account for identical header sections
The VHDX spec v1.00 declares that "a header is current if it is the only
valid header or if it is valid and its SequenceNumber field is greater
than the other header’s SequenceNumber field. The parser must only use
data from the current header. If there is no current header, then the
VHDX file is corrupt."
However, the Disk2VHD tool from Microsoft creates a VHDX image file that
has 2 identical headers, including matching checksums and matching
sequence numbers. Likely, as a shortcut the tool is just writing the
header twice, for the active and inactive headers, during the image
creation. Technically, this should be considered a corrupt VHDX file
(at least per the 1.00 spec, and that is how we currently treat it).
But in order to accomodate images created with Disk2VHD, we can safely
create an exception for this case. If we find identical sequence
numbers, then we check the VHDXHeader-sized chunks of each 64KB header
sections (we won't rely just on the crc32c to indicate the headers are
the same). If they are identical, then we go ahead and use the first
one.
Reported-by: Nerijus Baliūnas <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 26e2da72796c534ba3bc927a55a757d85bd10a3d
https://github.com/qemu/qemu/commit/26e2da72796c534ba3bc927a55a757d85bd10a3d
Author: Jeff Cody <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M tests/qemu-iotests/070
M tests/qemu-iotests/070.out
A tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2
Log Message:
-----------
block: add test for vhdx image created by Disk2VHD
This adds a test for VHDX images created by Microsoft's tool, Disk2VHD.
VHDX images created by this tool have 2 identical header sections, with
identical sequence numbers. This makes sure we detect VHDX images with
identical headers, and do not flag them as corrupt.
Signed-off-by: Jeff Cody <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 9c5268127722087eec88c4c41f3363855bb1234b
https://github.com/qemu/qemu/commit/9c5268127722087eec88c4c41f3363855bb1234b
Author: Max Reitz <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M include/qapi/qmp/qdict.h
M qobject/qdict.c
Log Message:
-----------
qdict: Add qdict_join()
This function joins two QDicts by absorbing one into the other.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 8a5eb36a1c3183e51c91b7887a816945c8ea4ec5
https://github.com/qemu/qemu/commit/8a5eb36a1c3183e51c91b7887a816945c8ea4ec5
Author: Max Reitz <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M tests/check-qdict.c
Log Message:
-----------
check-qdict: Add test for qdict_join()
Add some test cases for qdict_join().
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 4993f7ea7e63f18f18880289d6be8a9ab1591409
https://github.com/qemu/qemu/commit/4993f7ea7e63f18f18880289d6be8a9ab1591409
Author: Max Reitz <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block.c
Log Message:
-----------
block: Allow JSON filenames
If the filename given to bdrv_open() is prefixed with "json:", parse the
rest as a JSON object and merge the result into the options QDict. If
there are conflicts, the options QDict takes precedence.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 4ad303369c8818fb8bbe9f9c9f79e5de7c68e81e
https://github.com/qemu/qemu/commit/4ad303369c8818fb8bbe9f9c9f79e5de7c68e81e
Author: Max Reitz <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
A tests/qemu-iotests/089
A tests/qemu-iotests/089.out
M tests/qemu-iotests/group
Log Message:
-----------
iotests: Add test for the JSON protocol
Add a test for the JSON protocol driver.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: d530e342320d4db3c9522bfadc60a7bc8142343a
https://github.com/qemu/qemu/commit/d530e342320d4db3c9522bfadc60a7bc8142343a
Author: Markus Armbruster <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M tests/qemu-iotests/039
M tests/qemu-iotests/039.out
M tests/qemu-iotests/common.filter
Log Message:
-----------
qemu-iotests: Fix core dump suppression in test 039
The shell script attempts to suppress core dumps like this:
old_ulimit=$(ulimit -c)
ulimit -c 0
$QEMU_IO arg...
ulimit -c "$old_ulimit"
This breaks the test hard unless the limit was zero to begin with!
ulimit sets both hard and soft limit by default, and (re-)raising the
hard limit requires privileges. Broken since it was added in commit
dc68afe.
Could be fixed by adding -S to set only the soft limit, but I'm not
sure how portable that is in practice. Simply do it in a subshell
instead, like this:
(ulimit -c 0; exec $QEMU_IO arg...)
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: b5e51dd7144719148c5df42b38b6086366f90d5e
https://github.com/qemu/qemu/commit/b5e51dd7144719148c5df42b38b6086366f90d5e
Author: Fam Zheng <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M tests/qemu-iotests/030
Log Message:
-----------
qemu-iotests: Fix blkdebug in VM drive in 030
The test test_stream_pause in this class uses vm.pause_drive, which
requires a blkdebug driver on top of image, otherwise it's no-op and the
test running is undeterministic.
So add it.
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 9aedd5a5d607216e41bfa6a2c1f7f5d2b17041c3
https://github.com/qemu/qemu/commit/9aedd5a5d607216e41bfa6a2c1f7f5d2b17041c3
Author: Matthew Booth <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/curl.c
Log Message:
-----------
curl: Fix build when curl_multi_socket_action isn't available
Signed-off-by: Matthew Booth <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: e3542c67af4cb4fd90e3be912630be9acd97b9c0
https://github.com/qemu/qemu/commit/e3542c67af4cb4fd90e3be912630be9acd97b9c0
Author: Matthew Booth <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/curl.c
Log Message:
-----------
curl: Remove broken parsing of options from url
The block layer now supports a generic json syntax for passing option parameters
explicitly, making parsing of options from the url redundant.
Signed-off-by: Matthew Booth <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 97a3ea57198b39b8366cd2a7514707abdcd0a7bc
https://github.com/qemu/qemu/commit/97a3ea57198b39b8366cd2a7514707abdcd0a7bc
Author: Matthew Booth <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/curl.c
Log Message:
-----------
curl: Add sslverify option
This allows qemu to use images over https with a self-signed certificate. It
defaults to verifying the certificate.
Signed-off-by: Matthew Booth <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 0a86cb731758a7167374ca68735125ce81211002
https://github.com/qemu/qemu/commit/0a86cb731758a7167374ca68735125ce81211002
Author: Matthew Booth <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M qemu-options.hx
Log Message:
-----------
curl: Add usage documentation
Signed-off-by: Matthew Booth <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: ea54feff58efedc809641474b25a3130309678e7
https://github.com/qemu/qemu/commit/ea54feff58efedc809641474b25a3130309678e7
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/qcow.c
Log Message:
-----------
qcow1: Make padding in the header explicit
We were relying on all compilers inserting the same padding in the
header struct that is used for the on-disk format. Let's not do that.
Mark the struct as packed and insert an explicit padding field for
compatibility.
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Commit: 7159a45b2bf2dcb9f49f1e27d1d3d135a0247a2f
https://github.com/qemu/qemu/commit/7159a45b2bf2dcb9f49f1e27d1d3d135a0247a2f
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/qcow.c
A tests/qemu-iotests/092
A tests/qemu-iotests/092.out
M tests/qemu-iotests/group
Log Message:
-----------
qcow1: Check maximum cluster size
Huge values for header.cluster_bits cause unbounded allocations (e.g.
for s->cluster_cache) and crash qemu this way. Less huge values may
survive those allocations, but can cause integer overflows later on.
The only cluster sizes that qemu can create are 4k (for standalone
images) and 512 (for images with backing files), so we can limit it
to 64k.
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Commit: 42eb58179b3b215bb507da3262b682b8a2ec10b5
https://github.com/qemu/qemu/commit/42eb58179b3b215bb507da3262b682b8a2ec10b5
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/qcow.c
M tests/qemu-iotests/092
M tests/qemu-iotests/092.out
Log Message:
-----------
qcow1: Validate L2 table size (CVE-2014-0222)
Too large L2 table sizes cause unbounded allocations. Images actually
created by qemu-img only have 512 byte or 4k L2 tables.
To keep things consistent with cluster sizes, allow ranges between 512
bytes and 64k (in fact, down to 1 entry = 8 bytes is technically
working, but L2 table sizes smaller than a cluster don't make a lot of
sense).
This also means that the number of bytes on the virtual disk that are
described by the same L2 table is limited to at most 8k * 64k or 2^29,
preventively avoiding any integer overflows.
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Commit: 46485de0cb357b57373e1ca895adedf1f3ed46ec
https://github.com/qemu/qemu/commit/46485de0cb357b57373e1ca895adedf1f3ed46ec
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/qcow.c
M tests/qemu-iotests/092
M tests/qemu-iotests/092.out
Log Message:
-----------
qcow1: Validate image size (CVE-2014-0223)
A huge image size could cause s->l1_size to overflow. Make sure that
images never require a L1 table larger than what fits in s->l1_size.
This cannot only cause unbounded allocations, but also the allocation of
a too small L1 table, resulting in out-of-bounds array accesses (both
reads and writes).
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Commit: d66e5cee002c471b78139228a4e7012736b375f9
https://github.com/qemu/qemu/commit/d66e5cee002c471b78139228a4e7012736b375f9
Author: Kevin Wolf <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block/qcow.c
M tests/qemu-iotests/092
M tests/qemu-iotests/092.out
Log Message:
-----------
qcow1: Stricter backing file length check
Like qcow2 since commit 6d33e8e7, error out on invalid lengths instead
of silently truncating them to 1023.
Also don't rely on bdrv_pread() catching integer overflows that make len
negative, but use unsigned variables in the first place.
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Commit: 43f35cb5e0cff62e1d3fb1c116fbb8e028f2a5c8
https://github.com/qemu/qemu/commit/43f35cb5e0cff62e1d3fb1c116fbb8e028f2a5c8
Author: Peter Lieven <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M include/qemu-common.h
M util/iov.c
Log Message:
-----------
util: add qemu_iovec_is_zero
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 82a402e99f3f8c6177528ad6d561bf07ff6ee606
https://github.com/qemu/qemu/commit/82a402e99f3f8c6177528ad6d561bf07ff6ee606
Author: Peter Lieven <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M blockdev.c
Log Message:
-----------
blockdev: add a function to parse enum ids from strings
this adds a generic function to recover the enum id of a parameter
given as a string.
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 465bee1da82e43f18d10c43cc7566d0284ad13a9
https://github.com/qemu/qemu/commit/465bee1da82e43f18d10c43cc7566d0284ad13a9
Author: Peter Lieven <address@hidden>
Date: 2014-05-19 (Mon, 19 May 2014)
Changed paths:
M block.c
M block/qapi.c
M blockdev.c
M hmp.c
M include/block/block_int.h
M qapi-schema.json
M qemu-options.hx
M qmp-commands.hx
M tests/qemu-iotests/067.out
Log Message:
-----------
block: optimize zero writes with bdrv_write_zeroes
this patch tries to optimize zero write requests
by automatically using bdrv_write_zeroes if it is
supported by the format.
This significantly speeds up file system initialization and
should speed zero write test used to test backend storage
performance.
I ran the following 2 tests on my internal SSD with a
50G QCOW2 container and on an attached iSCSI storage.
a) mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vdX
QCOW2 [off] [on] [unmap]
-----
runtime: 14secs 1.1secs 1.1secs
filesize: 937M 18M 18M
iSCSI [off] [on] [unmap]
----
runtime: 9.3s 0.9s 0.9s
b) dd if=/dev/zero of=/dev/vdX bs=1M oflag=direct
QCOW2 [off] [on] [unmap]
-----
runtime: 246secs 18secs 18secs
filesize: 51G 192K 192K
throughput: 203M/s 2.3G/s 2.3G/s
iSCSI* [off] [on] [unmap]
----
runtime: 8mins 45secs 33secs
throughput: 106M/s 1.2G/s 1.6G/s
allocated: 100% 100% 0%
* The storage was connected via an 1Gbit interface.
It seems to internally handle writing zeroes
via WRITESAME16 very fast.
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: ca8c0fab9504f000216308cafc833eb957fe9284
https://github.com/qemu/qemu/commit/ca8c0fab9504f000216308cafc833eb957fe9284
Author: Peter Maydell <address@hidden>
Date: 2014-05-20 (Tue, 20 May 2014)
Changed paths:
M block.c
M block/curl.c
M block/qapi.c
M block/qcow.c
M block/vhdx.c
M blockdev.c
M hmp.c
M include/block/block.h
M include/block/block_int.h
M include/qapi/qmp/qdict.h
M include/qemu-common.h
M qapi-schema.json
M qemu-img.c
M qemu-options.hx
M qmp-commands.hx
M qobject/qdict.c
M tests/check-qdict.c
M tests/qemu-iotests/030
M tests/qemu-iotests/039
M tests/qemu-iotests/039.out
M tests/qemu-iotests/067.out
M tests/qemu-iotests/070
M tests/qemu-iotests/070.out
A tests/qemu-iotests/089
A tests/qemu-iotests/089.out
A tests/qemu-iotests/092
A tests/qemu-iotests/092.out
M tests/qemu-iotests/common.filter
M tests/qemu-iotests/group
A tests/qemu-iotests/sample_images/test-disk2vhd.vhdx.bz2
M util/iov.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches
# gpg: Signature made Mon 19 May 2014 15:21:14 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
* remotes/kevin/tags/for-upstream: (22 commits)
block: optimize zero writes with bdrv_write_zeroes
blockdev: add a function to parse enum ids from strings
util: add qemu_iovec_is_zero
qcow1: Stricter backing file length check
qcow1: Validate image size (CVE-2014-0223)
qcow1: Validate L2 table size (CVE-2014-0222)
qcow1: Check maximum cluster size
qcow1: Make padding in the header explicit
curl: Add usage documentation
curl: Add sslverify option
curl: Remove broken parsing of options from url
curl: Fix build when curl_multi_socket_action isn't available
qemu-iotests: Fix blkdebug in VM drive in 030
qemu-iotests: Fix core dump suppression in test 039
iotests: Add test for the JSON protocol
block: Allow JSON filenames
check-qdict: Add test for qdict_join()
qdict: Add qdict_join()
block: add test for vhdx image created by Disk2VHD
block: vhdx - account for identical header sections
...
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/c5fa6c86d076...ca8c0fab9504
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] e88ae2: block: Fix bdrv_is_allocated() for short backing f...,
GitHub <=