History | View | Annotate | Download (22.5 kB)
block/gluster: Add missing argument to qemu_gluster_init() call
Commit adccfbcd6020e928db93b2b4faf0dbd05ffbe016 (block: gluster - addreopen support.) did not supply the qemu_gluster_init() Error **argument, needed since commit a7451cb850d115f257080aff3fbc54f255ebf8f7...
block: gluster - code movements, state storage changes
In preparation for supporting reopen on gluster, move flagparsing out to a function. Also, add a NULL check in thegconf cleanup.
Signed-off-by: Jeff Cody <jcody@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: gluster - add reopen support.
Gluster does parse open flags in its .bdrv_open() implementation,and the .bdrv_reopen_* implementations need to do the same.
A new gluster connection to the image file to be created is establishedin the .bdrv_reopen_prepare(), and the image file opened with the new...
gluster: default scheme to gluster:// and host to localhost.
Currently, "gluster:///volname/img" and (using file. options)"file.driver=gluster,file.filename=foo" will segfault. Also,"//host/volname/img" will be rejected, but it is a valid URLthat should be accepted just fine with "file.driver=gluster"....
gluster: correctly propagate errors
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Fam Zheng <famz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Use error_is_set() only when necessary
error_is_set(&var) is the same as var != NULL, but it takeswhole-program analysis to figure that out. Unnecessarily hard foroptimizers, static checkers, and human readers. Dumb it down toobvious.
Gets rid of several dozen Coverity false positives....
gluster: Convert aio routines into coroutines
Convert the read, write, flush and discard implementations from aio-basedones to coroutine based ones.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>...
gluster: Implement .bdrv_co_write_zeroes for gluster
Support .bdrv_co_write_zeroes() from gluster driver by using GlusterFS APIglfs_zerofill() that off-loads the writing of zeroes to GlusterFS server.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>...
gluster: Add support for creating zero-filled image
GlusterFS supports creation of zero-filled file on GlusterFS volumeby means of an API called glfs_zerofill(). Use this API from QEMU tocreate an image that is filled with zeroes by using the preallocation...
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...
block: introduce BlockDriver.bdrv_needs_filename to enable some drivers.
Some drivers will have driver specifics options but no filename.This new bool allow the block layer to treat them correctly.
The .bdrv_needs_filename is set in drivers not having .bdrv_parse_filename and...
bdrv: Use "Error" for creating images
Add an Error ** parameter to BlockDriver.bdrv_create to allow morespecific 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.
gluster: Abort on AIO completion failure
Currently if gluster AIO callback thread fails to notify the QEMU thread aboutAIO completion, we try graceful recovery by marking the disk drive asinaccessible. This error recovery code is race-prone as found by Asias and...
aio: drop io_flush argument
The .io_flush() handler no longer exists and has no users. Drop theio_flush argument to aio_set_fd_handler() and related functions.
The AioFlushEventNotifierHandler and AioFlushHandler typedefs are nolonger used and are dropped too....
block/gluster: drop qemu_gluster_aio_flush_cb()
Since .io_flush() is no longer called we do not needqemu_gluster_aio_flush_cb() anymore. It turns out that qemu_aio_countis unused now and can be dropped.
Thanks to Bharata B Rao <bharata@linux.vnet.ibm.com> for catching a...
gluster: Add image resize support
Implement .bdrv_truncate in GlusterFS block driver so that GlusterFS backendcan support image resizing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com>...
gluster: Add discard support for GlusterFS block driver.
Implement bdrv_aio_discard for gluster.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
gluster: Return bdrv_has_zero_init = 0
GlusterFS volumes can be backed by block devices, in which casebdrv_create() doesn't make sure that the image is zeroed out. It iscurrently not possibly to detect whether a given image is backed by afile or a block device, and incorrectly assuming that it is zeroed...
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>
gluster: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passingthe "filename" to be parsed, but converting to actual fine grainedoptions is left for another day, as it doesn't look trivial.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
block: Add options QDict to bdrv_file_open() prototypes
The new parameter is unused yet.
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep comingback. Tracked down with this Coccinelle semantic patch:
r expression err, eno, cls, fmt; position p; @@ (...
r
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: Support GlusterFS as a QEMU block backend.
This patch adds gluster as the new block backend in QEMU. This givesQEMU the ability to boot VM images from gluster volumes. Its alreadypossible to boot from VM images on gluster volumes using FUSE mount, but...