Statistics
| Branch: | Revision:

root / qemu-io.c @ ac72472b

History | View | Annotate | Download (30.4 kB)

# Date Author Comment
660f11be 08/01/2009 12:16 am Blue Swirl

Fix Sparse warnings: "Using plain integer as NULL pointer"

Signed-off-by: Blue Swirl <>

a7824a88 07/22/2009 06:58 pm Kevin Wolf

qemu-io: Rework alloc command

The alloc command in qemu-io is mostly useless currently. Instead of doing a
single call to bdrv_is_allocated, we must call bdrv_is_allocated in a loop
until we have found out for each requested sector if it is allocated or not...

cf070d7e 07/22/2009 06:58 pm Christoph Hellwig

qemu-io: reject invalid pattern

Replace the use of atoi which is used for pattern parsing currently with
strtol. Atoi won't parse sedecimal pattern values (it always returns 0),
but qemu-iotests use such pattern values. Also reject every pattern
that is not a unsigned char as we pass the pattern to memset which...

ca94dbc7 07/17/2009 01:28 am Kevin Wolf

qemu-io: Implement bdrv_load_vmstate/bdrv_save_vmstate

The load_vmstate and save_vmstate functions are implemented as a
variation of the normal read/write operation, enabled by the -b option.
This is the same mechanism as is used to switch from read/write to...

1db6947d 07/17/2009 01:28 am Christoph Hellwig

qemu-io: use BDRV_O_FILE to implement the growable open option

Instead of doing our own check for protocols which fails because raw isn't
formally a protocol but special cased in find_protocol specify the BDRV_O_FILE
option to use the same code as bdrv_file_open does....

230d4fa4 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: small cleanups for the aio code

Address a couple of review comments from Kevin.

Signed-off-by: Christoph Hellwig <>

cf57298a 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: better input validation for vector-based commands

Fix up a couple of issues with validating the input of the various
length arguments for the vectored I/O commands:

- do the alignment check on each length instead the always 0 count argument
- use a long long varibale for the cvtnum return value so that we can check...
9c4bab26 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: add flag to mark files growable

Add a -g flag to the open command and the main qemu-io command line to
allow opening a file growable. This is only allowed for protocols,
mirroring the limitation exposed through bdrv_file_open.

Signed-off-by: Christoph Hellwig <>...

7d8abfcb 07/10/2009 08:25 pm Kevin Wolf

qemu-io: fix memory leak

qemu-io leaks the request buffer whenever the read or write function isn't
executed completely down the "normal" code path.

[hch: also fix the aio and vectored variants the same way]

Signed-off-by: Kevin Wolf <>...

3abcdf49 06/24/2009 05:09 pm Stefan Weil

Fix dump output in qemu-io.

The dump output was not nicely formatted for bytes
larger than 0x7f, because signed values expanded to
sizeof(int) bytes. So for example 0xab did not print
as "ab", but as "ffffffab".

I also cleaned the function prototype, which avoids...

84844a20 06/24/2009 05:09 pm Stefan Weil

qemu-io: Fix spelling in help message.

excerciser -> exerciser

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

95533d5f 06/24/2009 05:09 pm Christoph Hellwig

qemu-io: add aio read/write/flush commands

Add commands to exercise asynchronous reads/writes and to flush all
outstanding aio commands. Commands to exercise aio cancellations will
follow in a separate patch.

Signed-off-by: Christoph Hellwig <>...

d4ec5228 05/10/2009 01:22 am Paul Brook

Workaround compiler warnings at -O1

Signed-off-by: Paul Brook <>

d9654a58 05/01/2009 05:44 pm Kevin Wolf

qemu-io: Optionally verify only part of read data

There are reasonable test cases where a read must span areas that are not
uniformly filled with one pattern but contains several parts. This makes -P
useless for them currently.

Introducing additional options which determine the part of the read data that...

c48101ae 04/18/2009 06:36 pm aliguori

qemu-io: Verify read data by patterns (Kevin Wolf)

This patch adds a -P option to read and readv which allows to compare the read
data to a given pattern. This can be used to verify data written by write -P.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>...

838ab728 04/18/2009 06:36 pm aliguori

qemu-io: Fix handling of bdrv_is_allocated() return value (Kevin Wolf)

bdrv_is_allocated() returns a boolean which indicates if the offset is
allocated, not 0 on success and everything else is an error.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>...

7e9bbc9f 04/18/2009 06:36 pm aliguori

a couple of qemu-io fixes (Christoph Hellwig)

Fix two stupid bugs that I forgot to push out:

- qiov->size already is in bytes, no need to shift it
- actually use the supplied patter in the writev command

Signed-off-by: Christoph Hellwig <>...

e3aff4f6 04/05/2009 10:14 pm aliguori

Add files not included in previous commit.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6995 c046a42c-6fe2-441c-8c8c-71466251a162