[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 41/61] vmdk: refuse enabling zeroed grain with flat i
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 41/61] vmdk: refuse enabling zeroed grain with flat images |
Date: |
Fri, 11 Oct 2013 17:05:31 +0200 |
From: Fam Zheng <address@hidden>
This is a header flag and we needs sparse for the header.
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vmdk.c | 4 ++++
tests/qemu-iotests/059 | 4 ++++
tests/qemu-iotests/059.out | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/block/vmdk.c b/block/vmdk.c
index a1aaea7..709aa3d 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1664,6 +1664,10 @@ static int vmdk_create(const char *filename,
QEMUOptionParameter *options,
error_setg(errp, "Flat image can't have backing file");
return -ENOTSUP;
}
+ if (flat && zeroed_grain) {
+ error_setg(errp, "Flat image can't enable zeroed grain");
+ return -ENOTSUP;
+ }
if (backing_file) {
BlockDriverState *bs = bdrv_new("");
ret = bdrv_open(bs, backing_file, NULL, 0, NULL, errp);
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index 18cdad1..b81c575 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -71,6 +71,10 @@ echo "=== Testing monolithicFlat creation and opening ==="
IMGOPTS="subformat=monolithicFlat" _make_test_img 2G
$QEMU_IMG info $TEST_IMG | _filter_testdir
+echo
+echo "=== Testing monolithicFlat with zeroed_grain ==="
+IMGOPTS="subformat=monolithicFlat,zeroed_grain=on" _make_test_img 2G
+
# success, all done
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out
index 265cd76..9b12efb 100644
--- a/tests/qemu-iotests/059.out
+++ b/tests/qemu-iotests/059.out
@@ -22,4 +22,8 @@ image: TEST_DIR/t.vmdk
file format: vmdk
virtual size: 2.0G (2147483648 bytes)
disk size: 4.0K
+
+=== Testing monolithicFlat with zeroed_grain ===
+qemu-img: TEST_DIR/t.IMGFMT: Flat image can't enable zeroed grain
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2147483648
*** done
--
1.8.1.4
- [Qemu-devel] [PULL 33/61] block/raw-win32: Employ error parameter, (continued)
- [Qemu-devel] [PULL 33/61] block/raw-win32: Employ error parameter, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 34/61] blkdebug: Employ error parameter, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 35/61] blkverify: Employ error parameter, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 36/61] qemu-iotests: move blank lines of output in case 059, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 37/61] block/raw-posix: Employ error parameter, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 38/61] tests: build the helper program by default, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 39/61] build: add command check-clean, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 42/61] qapi-types/visit.py: Pass whole expr dict for structs, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 40/61] vmdk: convert error code to use errp, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 43/61] qapi-types/visit.py: Inheritance for structs, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 41/61] vmdk: refuse enabling zeroed grain with flat images,
Kevin Wolf <=
- [Qemu-devel] [PULL 44/61] blockdev: Introduce DriveInfo.enable_auto_del, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 45/61] blockdev: 'blockdev-add' QMP command, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 47/61] blockdev: Pass QDict to blockdev_init(), Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 46/61] blockdev: Separate ID generation from DriveInfo creation, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 48/61] blockdev: Move parsing of 'media' option to drive_init, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 49/61] blockdev: Move parsing of 'if' option to drive_init, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 50/61] blockdev: Moving parsing of geometry options to drive_init, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 51/61] blockdev: Move parsing of 'boot' option to drive_init, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 52/61] blockdev: Move bus/unit/index processing to drive_init, Kevin Wolf, 2013/10/11
- [Qemu-devel] [PULL 53/61] blockdev: Move virtio-blk device creation to drive_init, Kevin Wolf, 2013/10/11