qemu-e2k/tests
Chunyan Liu 4ab1559085 qemu-img create: add 'nocow' option
Add 'nocow' option so that users could have a chance to set NOCOW flag to
newly created files. It's useful on btrfs file system to enhance performance.

Btrfs has low performance when hosting VM images, even more when the guest
in those VM are also using btrfs as file system. One way to mitigate this bad
performance is to turn off COW attributes on VM files. Generally, there are
two ways to turn off NOCOW on btrfs: a) by mounting fs with nodatacow, then
all newly created files will be NOCOW. b) per file. Add the NOCOW file
attribute. It could only be done to empty or new files.

This patch tries the second way, according to the option, it could add NOCOW
per file.

For most block drivers, since the create file step is in raw-posix.c, so we
can do setting NOCOW flag ioctl in raw-posix.c only.

But there are some exceptions, like block/vpc.c and block/vdi.c, they are
creating file by calling qemu_open directly. For them, do the same setting
NOCOW flag ioctl work in them separately.

[Fixed up 082.out due to the new 'nocow' creation option
--Stefan]

Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-07-01 10:15:12 +02:00
..
acpi-test-data acpi-test: update expected tables 2014-06-19 16:41:53 +03:00
libqos qtest: fix qpci_config_writel 2014-06-02 16:28:59 +02:00
multiboot
qapi-schema qapi script: clean up in scripts 2014-06-27 09:27:56 -04:00
qemu-iotests qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
tcg Xtensa fixes queue 2014-05-26: 2014-05-28 14:47:35 +01:00
vmstate-static-checker-data tests: vmstate static checker: add size mismatch inside substructure 2014-06-23 19:14:52 +02:00
.gitignore tests/.gitignore: Ignore test-rfifolock 2014-04-27 13:04:18 +04:00
ac97-test.c tests: Add ac97 qtest 2014-05-05 20:58:33 +02:00
bios-tables-test.c tests: add smbios testing 2014-05-27 23:42:16 +03:00
blockdev-test.c
boot-order-test.c
check-block.sh
check-qdict.c check-qdict: Add test for qdict_join() 2014-05-19 11:36:48 +02:00
check-qfloat.c
check-qint.c
check-qjson.c json-lexer: fix escaped backslash in single-quoted string 2014-06-23 11:01:24 -04:00
check-qlist.c
check-qom-interface.c
check-qstring.c
display-vga-test.c add secondary-vga to display-vga test 2014-04-28 11:03:39 +02:00
e1000-test.c e1000: remove broken support for 82573L 2014-06-09 15:38:58 +02:00
eepro100-test.c
endianness-test.c
es1370-test.c tests: Add es1370 qtest 2014-05-05 20:58:33 +02:00
fdc-test.c
fw_cfg-test.c
hd-geo-test.c
i440fx-test.c
i82801b11-test.c
ide-test.c
intel-hda-test.c tests: Add intel-hda qtests 2014-05-05 20:58:33 +02:00
ioh3420-test.c tests: Add ioh3420 qtest 2014-05-05 20:58:33 +02:00
ipoctal232-test.c
libqtest.c qtest: Be paranoid about accept() addrlen argument 2014-05-05 20:58:33 +02:00
libqtest.h
m48t59-test.c
Makefile test: add test cases for qapi event 2014-06-23 11:01:25 -04:00
ne2000-test.c
nvme-test.c
pcnet-test.c
pvpanic-test.c
qdev-monitor-test.c
qemu-iotests-quick.sh
qom-test.c qom-test: Test qom-list on link<> properties 2014-05-28 17:35:01 +02:00
rtc-test.c
rtl8139-test.c
spapr-phb-test.c
test-aio.c
test-bitops.c
test-coroutine.c
test-cutils.c
test-hbitmap.c
test-int128.c
test-iov.c
test-mul64.c
test-opts-visitor.c
test-qdev-global-props.c qdev: Add test of qdev_prop_check_global 2014-06-05 19:20:38 +03:00
test-qemu-opts.c QemuOpt: add unit tests 2014-05-28 14:27:42 +02:00
test-qmp-commands.c
test-qmp-event.c tests/test-qmp-event: fix for GLib < 2.31 2014-06-30 15:06:11 +02:00
test-qmp-input-strict.c qapi: Replace uncommon use of the error API by the common one 2014-05-15 14:00:46 -04:00
test-qmp-input-visitor.c qapi: Replace uncommon use of the error API by the common one 2014-05-15 14:00:46 -04:00
test-qmp-output-visitor.c tests: Check empty QMP output visitor 2014-05-28 17:36:09 +02:00
test-rfifolock.c
test-string-input-visitor.c tests: simplify code 2014-06-19 18:44:22 +03:00
test-string-output-visitor.c tests: add human format test for string output visitor 2014-06-29 19:39:43 +03:00
test-thread-pool.c aio: Fix use-after-free in cancellation path 2014-05-28 14:28:46 +02:00
test-throttle.c throttle: add detach/attach test case 2014-06-04 09:56:12 +02:00
test-visitor-serialization.c qapi: Replace uncommon use of the error API by the common one 2014-05-15 14:00:46 -04:00
test-vmstate.c vmstate: Refactor & increase tests for primitive types 2014-06-23 19:14:52 +02:00
test-x86-cpuid.c
test-xbzrle.c
tmp105-test.c
tpci200-test.c
usb-hcd-ehci-test.c usb: improve ehci/uhci test 2014-06-02 16:28:59 +02:00
vhost-user-test.c qtest: fix vhost-user-test unbalanced mutex locks 2014-06-23 17:37:59 +03:00
virtio-9p-test.c
virtio-balloon-test.c
virtio-blk-test.c
virtio-console-test.c
virtio-net-test.c
virtio-rng-test.c
virtio-scsi-test.c
virtio-serial-test.c
vmxnet3-test.c