History | View | Annotate | Download (11.8 kB)
block: Create authorizations mechanism for external snapshot and resize.
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blkverify: Allow command-line configuration
Introduce the "test" and "raw" options for specifying images.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blkverify: Don't require protocol filename
If the filename is not prefixed by "blkverify:" inblkverify_parse_filename(), the blkverify driver was not selectedthrough that protocol prefix, but by an explicit command line (or QMP)option (like driver=blkverify)....
block: Allow reference for bdrv_file_open()
Allow specifying a reference to an existing block device (by name) forbdrv_file_open() instead of a filename and/or options.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>...
qemu-option: Remove qemu_opts_create_nofail
This is a boiler-plate _nofail variant of qemu_opts_create. Remove anduse error_abort in call sites.
null/0 arguments needs to be added for the id and fail_if_exists fieldsin affected callsites due to argument inconsistency between the normal and...
blkverify: Employ error parameter
Make use of the error parameter in blkverify_open.
block: Add BlockDriver.bdrv_check_ext_snapshot.
This field is used by blkverify to disable external snapshots creation.It will also be used by block filters like quorum to disable externalsnapshot creation.
Signed-off-by: Benoit Canet <benoit@irqsave.net>...
block: Error parameter for open functions
Add an Error ** parameter to bdrv_open, bdrv_file_open and associatedfunctions to allow more specific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open andBlockDriver.bdrv_file_open to allow more specific error messages.
block: make bdrv_delete() static
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is nolonger public and should be called by bdrv_unref() if refcnt isdecreased to 0.
This is an identical change because effectively, there's no multiplereference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets...
block: Remove filename parameter from .bdrv_file_open()
It is unused now in all block drivers.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
blkverify: Use bdrv_open options instead of filename
block: Add options QDict to bdrv_file_open() prototypes
The new parameter is unused yet.
block: Add options QDict to bdrv_open() prototype
It doesn't do anything yet except storing the options QDict in theBlockDriverState.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: move include files to include/block/
aio: rename AIOPool to AIOCBInfo
Now that AIOPool no longer keeps a freelist, it isn't really a "pool" anymore. Rename it to AIOCBInfo and make it const since it no longerneeds to be modified.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: replace unchecked strdup/malloc/calloc with glib
Most of the codebase as been converted to use glib memory allocationfunctions. There are still a few instances of malloc/calloc in theblock layer and qemu-io. Replace them, especially since they do not...
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) { ... }...
rule1
block: drop redundant bdrv_flush implementation
Block drivers now only need to provide either of .bdrv_co_flush,.bdrv_aio_flush() or for legacy drivers .bdrv_flush(). Removethe redundant .bdrv_flush() implementations.
[Paolo Bonzini: change raw driver to bdrv_co_flush]...
block: avoid a warning on 64 bit hosts with long as int64_t
When building on a 64 bit host which uses 'long' for int64_t,GCC emits a warning: CC block/blkverify.o/src/qemu/block/blkverify.c: In function `blkverify_verify_readv':/src/qemu/block/blkverify.c:304: warning: long long int format, long...
block: Allow bdrv_flush to return errors
This changes bdrv_flush to return 0 on success and -errno in case of failure.It's a requirement for implementing proper error handle in users of bdrv_flush.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
block: Use GCC_FMT_ATTR and fix a format error
Adding the gcc format attribute detects a format bugwhich is fixed here.
v2:Don't use type cast. BDRV_SECTOR_SIZE is unsigned long long,so %lld should be the correct format specifier.
Cc: Blue Swirl <blauwirbel@gmail.com>...
block-verify: fix 32-bit build
Reported-by: Peter Lemenkov <lemenkov@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
blkverify: Add block driver for verifying I/O
The blkverify block driver makes investigating image format datacorruption much easier. A raw image initialized with the same contentsas the test image (e.g. qcow2 file) must be provided. The raw imagemirrors read/write operations and is used to verify that data read from...