History log of /qemu/qemu-io.c (Results 126 – 150 of 181)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 031380d8 16-Jan-2012 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

block: replace unchecked strdup/malloc/calloc with glib

Most of the codebase as been converted to use glib memory allocation
functions. There are still a few instances of malloc/calloc in the
block

block: replace unchecked strdup/malloc/calloc with glib

Most of the codebase as been converted to use glib memory allocation
functions. There are still a few instances of malloc/calloc in the
block layer and qemu-io. Replace them, especially since they do not
check the strdup/malloc/calloc return value.

Reported-by: Dr David Alan Gilbert <davidagilbert@uk.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


Revision tags: v1.0
# ad54ae80 30-Nov-2011 Paolo Bonzini <pbonzini@redhat.com>

block: bdrv_aio_* do not return NULL

Initially done with the following semantic patch:

@ rule1 @
expression E;
statement S;
@@
E =
(
bdrv_aio_readv
| bdrv_aio_writev
| bdrv_aio_flush
| bdrv

block: bdrv_aio_* do not return NULL

Initially done with the following semantic patch:

@ rule1 @
expression E;
statement S;
@@
E =
(
bdrv_aio_readv
| bdrv_aio_writev
| bdrv_aio_flush
| bdrv_aio_discard
| bdrv_aio_ioctl
)
(...);
(
- if (E == NULL) { ... }
|
- if (E)
{ <... S ...> }
)

which however missed the occurrence in block/blkverify.c
(as it should have done), and left behind some unused
variables.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# 922453bc 30-Nov-2011 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

block: convert qemu_aio_flush() calls to bdrv_drain_all()

Many places in QEMU call qemu_aio_flush() to complete all pending
asynchronous I/O. Most of these places actually want to drain all block
r

block: convert qemu_aio_flush() calls to bdrv_drain_all()

Many places in QEMU call qemu_aio_flush() to complete all pending
asynchronous I/O. Most of these places actually want to drain all block
requests but there is no block layer API to do so.

This patch introduces the bdrv_drain_all() API to wait for requests
across all BlockDriverStates to complete. As a bonus we perform checks
after qemu_aio_wait() to ensure that requests really have finished.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


Revision tags: v1.0-rc4
# 07f35073 22-Nov-2011 Dong Xu Wang <wdongxu@linux.vnet.ibm.com>

fix spelling in main directory

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>


Revision tags: v1.0-rc3, v1.0-rc2, v1.0-rc1, v1.0-rc0
# 67403dbb 31-Oct-2011 Kevin Wolf <kwolf@redhat.com>

qemu-io: Fix multiwrite_f error handling

Without this fix, some qiovs can be leaked if an error occurs. Also a semicolon
at the end of the command line would make the code walk beyond the end of arg

qemu-io: Fix multiwrite_f error handling

Without this fix, some qiovs can be leaked if an error occurs. Also a semicolon
at the end of the command line would make the code walk beyond the end of argv.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# f2360620 31-Oct-2011 Kevin Wolf <kwolf@redhat.com>

qemu-io: Handle create_iovec errors

Callers of create_iovec() didn't check for failure and continued with
uninitialised data in error cases. This patch adds checks to each call.

Signed-off-by: Kevi

qemu-io: Handle create_iovec errors

Callers of create_iovec() didn't check for failure and continued with
uninitialised data in error cases. This patch adds checks to each call.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# b4657855 27-Oct-2011 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

qemu-io: delete bs instead of leaking it

Using bdrv_close() is not enough to free a BlockDriverState. Since we
explicitly create it with bdrv_new(), use bdrv_delete() to close and
delete it.

Signe

qemu-io: delete bs instead of leaking it

Using bdrv_close() is not enough to free a BlockDriverState. Since we
explicitly create it with bdrv_new(), use bdrv_delete() to close and
delete it.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


Revision tags: v0.15.1
# b1b1dad3 28-Sep-2011 Alex Jia <ajia@redhat.com>

fix memory leak in aio_write_f

Haven't released memory of 'ctx' before return.

Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


# b2bedb21 12-Sep-2011 Stefan Weil <weil@mail.berlios.de>

Remove blanks before \n in output strings

Those blanks violate the coding conventions, see
scripts/checkpatch.pl.

Blanks missing after colons in the changed lines were added.

This patch does not t

Remove blanks before \n in output strings

Those blanks violate the coding conventions, see
scripts/checkpatch.pl.

Blanks missing after colons in the changed lines were added.

This patch does not try to fix tabs, long lines and other
problems in the changed lines, therefore checkpatch.pl reports
many violations.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

show more ...


# 84c8c656 04-Sep-2011 Blue Swirl <blauwirbel@gmail.com>

qemu-io: remove unnecessary assignment

Remove an unnecessary assignment, spotted by clang analyzer:
/src/qemu/qemu-io.c:995:9: warning: Value stored to 'offset' is never read
offset += reqs[

qemu-io: remove unnecessary assignment

Remove an unnecessary assignment, spotted by clang analyzer:
/src/qemu/qemu-io.c:995:9: warning: Value stored to 'offset' is never read
offset += reqs[i].qiov->size;

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

show more ...


# 7267c094 21-Aug-2011 Anthony Liguori <aliguori@us.ibm.com>

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


Revision tags: v0.15.0, v0.15.0-rc2, v0.15.0-rc1, v0.15.0-rc0
# 5afc8b3d 11-Jul-2011 Devin Nakamura <devin122@gmail.com>

qemu-io: Fix if scoping bug

Fix a bug caused by lack of braces in if statement

Lack of braces means that if(count & 0x1ff) is never reached

Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signe

qemu-io: Fix if scoping bug

Fix a bug caused by lack of braces in if statement

Lack of braces means that if(count & 0x1ff) is never reached

Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# 43642b38 11-Jul-2011 Devin Nakamura <devin122@gmail.com>

qemu-io: Fix formatting

Replaced tabs with spaces, 8 space indentations with 4 space
indentation, and other fixes to better adhere to CODING_STYLE

Signed-off-by: Devin Nakamura <devin122@gmail.com>

qemu-io: Fix formatting

Replaced tabs with spaces, 8 space indentations with 4 space
indentation, and other fixes to better adhere to CODING_STYLE

Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# a6599793 17-May-2011 Christoph Hellwig <hch@lst.de>

block: clarify the meaning of BDRV_O_NOCACHE

Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache,
but no writeback semantics. All existing callers are changed to also
specify BDRV_

block: clarify the meaning of BDRV_O_NOCACHE

Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache,
but no writeback semantics. All existing callers are changed to also
specify BDRV_O_CACHE_WB to give them writeback semantics.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


Revision tags: v0.14.1, v0.14.0, v0.14.0-rc2, v0.14.0-rc1, v0.14.0-rc0
# a9c49a6b 26-Jan-2011 Kevin Wolf <kwolf@redhat.com>

qemu-io: Fix discard command

qemu-io passed bytes where it's supposed to pass sectors, so discard requests
were off.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa

qemu-io: Fix discard command

qemu-io passed bytes where it's supposed to pass sectors, so discard requests
were off.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

show more ...


# 1afec913 12-Jan-2011 Blue Swirl <blauwirbel@gmail.com>

qemu-io: fix a memory leak

Fix a memory leak, reported by cppcheck:
[/src/qemu/qemu-io.c:1135]: (error) Memory leak: ctx

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>


# 095343ad 17-Dec-2010 Kevin Wolf <kwolf@redhat.com>

qemu-io: Fix typo in help texts

Signed-off-by: Kevin Wolf <kwolf@redhat.com>


# edff5db1 13-Dec-2010 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

qemu-io: Add discard command

discard [-Cq] off len -- discards a number of bytes at a specified
offset

discards a range of bytes from the given offset

Example:
'discard 512 1k' - discards 1 kil

qemu-io: Add discard command

discard [-Cq] off len -- discards a number of bytes at a specified
offset

discards a range of bytes from the given offset

Example:
'discard 512 1k' - discards 1 kilobyte from 512 bytes into the file

Discards a segment of the currently open file.
-C, -- report statistics in a machine parsable format
-q, -- quite mode, do not show I/O statistics

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# ad717139 16-Dec-2010 Kevin Wolf <kwolf@redhat.com>

Remove NULL checks for bdrv_new return value

It's an indirect call to qemu_malloc, which never returns an error.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>


Revision tags: v0.13.0, v0.13.0-rc3, v0.13.0-rc2
# 191c2890 16-Sep-2010 Kevin Wolf <kwolf@redhat.com>

qemu-io: New command map

The new map command in qemu-io lists all allocated/unallocated areas in an
image file.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>


# 72aef731 12-Sep-2010 Christoph Hellwig <hch@lst.de>

use qemu_blockalign consistently

Use qemu_blockalign for all allocations in the block layer. This allows
increasing the required alignment, which is need to support O_DIRECT on
devices with large b

use qemu_blockalign consistently

Use qemu_blockalign for all allocations in the block layer. This allows
increasing the required alignment, which is need to support O_DIRECT on
devices with large block sizes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# b407a81e 02-Sep-2010 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

qemu-io: Make alloc output useful when nb_sectors=1

There is no indication whether or not the sector is allocated when
nb_sectors=1:

sector allocated at offset 64 KiB

This message is produced wh

qemu-io: Make alloc output useful when nb_sectors=1

There is no indication whether or not the sector is allocated when
nb_sectors=1:

sector allocated at offset 64 KiB

This message is produced whether or not the sector is allocated.

Simply use the same message as the plural case, I don't think the
English is so broken that we need special case output here:

0/1 sectors allocated at offset 64 KiB

This change does not affect qemu-iotests since nb_sectors=1 is not used
there.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


Revision tags: v0.13.0-rc1, v0.13.0-rc0, v0.12.5
# ca1d6ac6 21-Jul-2010 Joel Schopp <jschopp@austin.ibm.com>

fix variable type in qemu-io.c

The variable len can get a negative return value from cvtnum,
which we check for, but which is impossible with the current
unsigned variable type. Currently the if(le

fix variable type in qemu-io.c

The variable len can get a negative return value from cvtnum,
which we check for, but which is impossible with the current
unsigned variable type. Currently the if(len < 0) check is
pointless. This patch fixes that.

Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

show more ...


# 0923c577 28-May-2010 Kevin Wolf <kwolf@redhat.com>

qemu-io: Fix error messages

The truncate and getlength commands passed a negative error number to strerror.
They also happen to be the two functions that are lacking a newline at the end
of their er

qemu-io: Fix error messages

The truncate and getlength commands passed a negative error number to strerror.
They also happen to be the two functions that are lacking a newline at the end
of their error message.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# 776cbbbd 21-May-2010 Kevin Wolf <kwolf@redhat.com>

qemu-io: Add multiwrite command

The new multiwrite commands allows to use qemu-io for testing
bdrv_aio_multiwrite.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>


12345678