- Dec 04, 2013
-
-
Fam Zheng authored
This replaces _unsupported_qemu_io_options and check for support of current cache mode, and allow to provide a default if user didn't specify. Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
This will allow overriding cache mode from the "-c mode" option. Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
The option sets cache mode used in the tests. "-nocache" is changed to an alias to "-c none", and internally passes "-t none" to qemu-io. Python scripts will make use of option this in the next commit. Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Kevin Wolf authored
Strictly speaking, this is only required for has_zero_init() == false, but it's easy enough to just do a cluster-aligned write that is padded with zeros after the header. This fixes that after 'qemu-img create' header extensions are attempted to be parsed that are really just random leftover data. Cc: qemu-stable@nongnu.org Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Hanna Reitz authored
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). In addition, the BlockDriverState in bdrv_img_create() is used for the backing file only; it should therefore be made local to the respective block. Signed-off-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Dec 03, 2013
-
-
Paolo Bonzini authored
Fetch the data to be written from the input buffer. If it is all zeroes, we can use the write_zeroes call (possibly with the new MAY_UNMAP flag). Otherwise, do as many write cycles as needed, writing 512k at a time. Strictly speaking, this is still incorrect because a zero cluster should only be written if the MAY_UNMAP flag is set. But this is a bug in qcow2 and the other formats, not in the SCSI code. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Since we report ANC_SUP==0 in VPD page B2h, we need to return an error (ILLEGAL REQUEST/INVALID FIELD IN CDB) for all WRITE SAME requests with ANCHOR==1. Inspired by a similar patch to the LIO in-kernel target. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This is the same that is already done for WRITE SAME. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
The code is similar to the implementation of discard and write_zeroes with UNMAP. However, failure must be propagated up to block.c. The stale page cache problem can be reproduced as follows: # modprobe scsi-debug lbpws=1 lbprz=1 # ./qemu-io /dev/sdXX qemu-io> write -P 0xcc 0 2M qemu-io> write -z 0 1M qemu-io> read -P 0x00 0 512 Pattern verification failed at offset 0, 512 bytes qemu-io> read -v 0 512 00000000: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ ... # ./qemu-io --cache=none /dev/sdXX qemu-io> write -P 0xcc 0 2M qemu-io> write -z 0 1M qemu-io> read -P 0x00 0 512 qemu-io> read -v 0 512 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ... And similarly with discard instead of "write -z". Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
See the next commit for the description of the Linux kernel problem that is worked around in raw_open_common. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Writing zeroes to a file can be done by punching a hole if MAY_UNMAP is set. Note that in this case ENOTSUP is not ignored, but makes the block layer fall back to the generic implementation. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
The current check is right for MAY_UNMAP=1. For MAY_UNMAP=0, just try and fall back to regular writes as soon as a WRITE SAME command fails. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Peter Lieven authored
added myself to reflect recent work on the iscsi block driver. Signed-off-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Peter Lieven authored
since commit 3ac21627 the default value changed to 0. Signed-off-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This will let misaligned but large requests use zero clusters. This is important because the cluster size is not guest visible. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Right now, bdrv_co_do_write_zeroes will only try to align the beginning of the request. However, it is simpler for many formats to expect the block layer to separate both the head *and* the tail. This makes sure that the format's bdrv_co_write_zeroes function will be called with aligned sector_num and nb_sectors for the bulk of the request. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Similar to write_zeroes, let the generic code receive a ENOTSUP for discard operations. Since bdrv_discard has advisory semantics, we can just swallow the error. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This will be used by the SCSI layer. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This lets bdrv_co_do_rw receive flags, so that it can be used for zero writes. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
bdrv_co_discard is only covering drivers which have a .bdrv_co_discard() implementation, but not those with .bdrv_aio_discard(). Not very nice, and easy to avoid. Suggested-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
The buffer for description file was 4096 which only covers a few hundred of extents. This changes the buffer to dynamic allocated with g_strdup_printf in order to support bigger cases. Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Dec 02, 2013
-
-
Marc-André Lureau authored
The AioContext ctx field is apparently unused in qemu codebase since 02ffb504. Signed-off-by:
Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc-André Lureau authored
qemu_co_queue_wait_insert_head() is unused in qemu code base now. Signed-off-by:
Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Nov 29, 2013
-
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Fam Zheng authored
This removes "qemu-io> " prompt from qemu-io output in _filter_qemu_io, and updates all the output files with the following command: cd tests/qemu-iotests && sed -i "s/qemu-io> //g" *.out Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
If you open an image temporarily just because you want to check its size or get it flushed, there's no real reason to open the whole backing file chain. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Benoit Canet <benoit@irqsave.net>
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Kevin Wolf authored
In the case of snapshot=on, don't rely on the backing file path in the temporary image any more, but override the backing file with the given set of options. This way, block drivers that don't use a file name can be accessed with snapshot=on, for example: -drive file.driver=nbd,file.host=localhost,snapshot=on Which becomes internally something like: file.filename=/tmp/vl.AWQZCu,backing.file.driver=nbd,backing.file.host=localhost Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Fam Zheng authored
Pause the drive and start the block job, so we won't miss the block job. Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
They wrap blkdebug "break" and "remove_break". Add optional argument "resume" to cancel_and_wait(). Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
This adds "remove_break" command which is the reverse of blkdebug command "break": it removes all breakpoints with given tag and resumes all the requests. Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
iotests.py already has one. Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Liu Yuan authored
Sheepdog support two kinds of redundancy, full replication and erasure coding. # create a fully replicated vdi with x copies -o redundancy=x (1 <= x <= SD_MAX_COPIES) # create a erasure coded vdi with x data strips and y parity strips -o redundancy=x:y (x must be one of {2,4,8,16} and 1 <= y < SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Liu Yuan authored
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-