History | View | Annotate | Download (24.2 kB)
xen: Reorganize includes of Xen headers.
Because xs.h will be remove in future release of Xen, this patch removes theextra includes of this headers.
Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as therealready are in xen_common.h....
xen: Don't peek behind the BlockDriverState abstraction
First offender is xen_config_dev_blk()'s use of disk->bdrv->filename.Get the filename from disk->opts instead. Same result, except forsnapshots: there, we now get the filename specified by the user...
qemu/xendisk: set maximum number of grants to be used
Legacy (non-pvops) gntdev drivers may require this to be done when thenumber of grants intended to be used simultaneously exceeds a certaindriver specific default limit.
Signed-off-by: Jan Beulich <jbeulich@suse.com>...
xen_disk: remove syncwrite option
This patch removes a dead option.
The same can be achieved removing BDRV_O_NOCACHE and BDRV_O_CACHE_WBfrom the flags passed to bdrv_open.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen_disk: use bdrv_aio_flush instead of bdrv_flush
Use bdrv_aio_flush instead of bdrv_flush.
Make sure to call bdrv_aio_writev/readv after the presync bdrv_aio_flush is fullycompleted and make sure to call the postsync bdrv_aio_flush afterbdrv_aio_writev/readv is fully completed....
xen_disk: properly update stats in ioreq_release()
While for the "normal" case (called from blk_send_response_all())decrementing requests_finished is correct, doing so in the parse errorcase is wrong; requests_inflight needs to be decremented instead....
xen: handle backend deletion from xenstore
Merge remote-tracking branch 'sstabellini/disk_io' into staging
xen_disk: detach the blkdev before bdrv_delete
We need to detach the blkdev from the BlockDriverState before callingbdrv_delete.
xen_disk: when using AIO flush after the operation is completed
If ioreq->postsync call bdrv_flush when the AIO operation is actuallycompleted.
xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
xen_disk: remove dead code
Xen_disk.c has support for using synchronous I/O instead of asynchronous,but it is compiled out by default. Remove it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xen_disk: Always set feature-barrier = 1
The synchronous .bdrv_flush callback doesn't exist any more and a device reallyshouldn't poke into the block layer internals anyway. All drivers are supposedto have a correctly working bdrv_flush, so let's just hard-code this....
Introduce a new 'connected' xendev op called when Connected.
Rename the existing xendev 'connect' op to 'initialised' and introducea new 'connected' op. This new op, if defined, is called when thebackend is connected. Note that since there is no state transition this...
block: Attach non-qdev devices as well
For now, this just protects against programming errors like having thesame drive back multiple non-qdev devices, or untimely bdrv_delete().Later commits will add other interesting uses.
While there, rename BlockDriverState member peer to dev, bdrv_attach()...
block: explicit I/O accounting
Decouple the I/O accounting from bdrv_aio_readv/writev/flush andmake the hardware models call directly into the accounting helpers.
This means: - we do not count internal requests from image formats in addition to guest originating I/O...
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>
xen_disk: cope with missing xenstore "params" node
When disk is a cdrom and the drive is empty the "params" node inxenstore might be missing completely: cope with it instead ofsegfaulting.
Updated in v2:
- actually removed the strchr(blkdev->params, ':') that caused the...
xen_disk: treat "aio" as "raw"
Sometimes the toolstack uses "aio" without an additional formatidentifier, in such cases use "raw".
- fix code style.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
hw/xen_disk: Remove unused local variable
cppcheck report:hw/xen_disk.c:309: style: Variable 'len' is assigned a value that is never used
Cc: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xen: Replace some tab-indents with spaces (clean-up).
And put braces for blocks with a single statement.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Support new libxc calls from xen unstable.
This patch updates the libxenctrl calls in Qemu to use the new interface,otherwise Qemu wouldn't be able to build against new versions of thelibrary.
We check libxenctrl version in configure, from Xen 3.3.0 to Xen...
hw/xen_disk: ioreq not finished on error
Bug fix: routines 'ioreq_runio_qemu_sync' and 'ioreq_runio_qemu_aio'won't call 'ioreq_unmap' or 'ioreq_finish' on errors, leaving ioreq inthe blkdev->inflight list and a leak.
Signed-off-by: Feiran Zheng <famcool@gmail.com>...
hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
In hw/xen_disk.c, async writing ioreq is leaked whenioreq->req.nr_segments==0, because `aio_inflight` flag is not releasedproperly (skipped by misplaced "break").
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>
qemu and qemu-xen: support empty write barriers in xen_disk
This patch can be applied to both qemu-xen and qemu and adds supportfor empty write barriers to xen_disk.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read.
Replace calls of old bdrv_open
What is known today as bdrv_open2 becomes the new bdrv_open. All remainingcallers of the old function are converted to the new one. In some places theyeven know the right format, so they should have used bdrv_open2 from the...
Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.
Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...
Configurable block format whitelist
We have code for a quite a few block formats. While I trust that allof these formats are useful at least for some people in somecircumstances, some of them are of a kind that friends don't letfriends use in production....
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
Update to a hopefully more future proof FSF address
xen_disk: move sanity check to the correct place
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Fix compilation when x86_64 is defined
Use a more natural order
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7234 c046a42c-6fe2-441c-8c8c-71466251a162
xen: add block device backend driver. (Gerd Hoffmann)
This patch adds a block device backend driver to qemu. It is a pureuserspace implemention using the gntdev interface. It uses "qdisk" asbackend name in xenstore so it doesn't interfere with the other existing...