- 28 10月, 2016 40 次提交
-
-
由 Paolo Bonzini 提交于
After the next patch bdrv_drain_all will have to be called without holding any AioContext. Prepare to do this by adding an AioContext argument to bdrv_reopen_multiple. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-15-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
This will be needed in the next patch to retrieve the AioContext. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-14-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
Soon bdrv_drain will not call aio_poll itself on iothreads. If block devices are left hanging off the iothread's AioContext, there will be no one to do I/O for those poor devices. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-13-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
This will be used by BDRV_POLL_WHILE (and thus by bdrv_drain) to choose how to wait for I/O completion. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-12-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
This is important when the sheepdog driver works on a BlockDriverState that is attached to an I/O thread other than the main thread. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-11-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
This will make it possible to use nfs_get_allocated_file_size on a file that is not in the main AioContext. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-10-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
nfs_set_events only needs to be called once before entering the while loop; afterwards, nfs_process_read and nfs_process_write take care of it. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-9-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
We want the BDS event loop to run exclusively in the iothread that owns the BDS's AioContext. This macro will provide the synchronization between the two event loops; for now it just wraps the common idiom of a while loop around aio_poll. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-8-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Fam Zheng 提交于
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. To comply with the bdrv_drain semantics, we should make sure it remains deleted once .bdrv_drain is called. The change to qed_need_check_timer_cb is needed because bdrv_qed_drain is called after s->bs has been drained, and should not operate on it; instead it should operate on the BdrvChild-ren exclusively. Doing so is easy because QED does not have a bdrv_co_flush_to_os callback, hence all that is needed to flush it is to ensure writes have reached the disk. Based on commit df9a681d (which however included some unrelated hunks, possibly due to a merge failure or an overlooked squash). The patch was reverted because at the time bdrv_qed_drain could call qed_plug_allocating_write_reqs while an allocating write was queued. This however is not possible anymore after the previous patch; .bdrv_drain is only called after all writes have completed at the QED level, and its purpose is to trigger metadata writes in bs->file. Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-7-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
bdrv_requests_pending is checking children to also wait until internal requests (such as metadata writes) have completed. However, checking children is in general overkill. Children requests can be of two kinds: - requests caused by an operation on bs, e.g. a bdrv_aio_write to bs causing a write to bs->file->bs. In this case, the parent's in_flight count will always be incremented by at least one for every request in the child. - asynchronous metadata writes or flushes. Such writes can be started even if bs's in_flight count is zero, but not after the .bdrv_drain callback has been invoked. This patch therefore changes bdrv_drain to finish I/O in the parent (after which the parent's in_flight will be locked to zero), call bdrv_drain (after which the parent will not generate I/O on the child anymore), and then wait for internal I/O in the children to complete. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-6-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
Unlike tracked_requests, this field also counts throttled requests, and remains non-zero if an AIO operation needs a BH to be "really" completed. With this change, it is no longer necessary to have a dummy BdrvTrackedRequest for requests that are never serialising, and it is no longer necessary to poll the AioContext once after bdrv_requests_pending(bs) returns false. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-5-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
Ensure that there are no changes between the last check to bdrv_get_dirty_count and the switch to the target. There is already a bdrv_drained_end call, we only need to ensure that bdrv_drained_begin is not called twice. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-4-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
This is required to decouple block jobs from running in an AioContext. With multiqueue block devices, a BlockDriverState does not really belong to a single AioContext. The solution is to first wait until all I/O operations are complete; then loop in the main thread for the block job to complete entirely. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-3-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
Without this change, there is a race condition in tests/test-replication. Depending on how fast the failover job (active commit) runs, there is a chance of two bad things happening: 1) replication_done can be called after the secondary has been closed and hence when the BDRVReplicationState is not valid anymore. 2) two copies of the active disk are present during the /replication/secondary/stop test (that test runs immediately after /replication/secondary/start, which tests failover). This causes the corruption detector to fire. Reviewed-by: NWen Congyang <wency@cn.fujitsu.com> Reviewed-by: NChanglong Xie <xiecl.fnst@cn.fujitsu.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-2-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Peter Maydell 提交于
Block layer patches # gpg: Signature made Thu 27 Oct 2016 18:15:47 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (23 commits) iotests: Add test for NBD's blockdev-add interface iotests: Add assert_json_filename_equal() method socket_scm_helper: Accept fd directly iotests.py: Allow concurrent qemu instances iotests.py: Add qemu_nbd function qapi: Allow blockdev-add for NBD block/nbd: Use SocketAddress options block/nbd: Accept SocketAddress block/nbd: Add nbd_has_filename_options_conflict() block/nbd: Use qdict_put() block/nbd: Default port in nbd_refresh_filename() block/nbd: Reject port parameter without host block/nbd: Drop trailing "." in error messages qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX block: Remove bdrv_aio_ioctl() raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl block: Introduce .bdrv_co_ioctl() driver callback block: Remove bdrv_ioctl() raw-posix: Don't use bdrv_ioctl() block: Use blk_co_ioctl() for all BB level ioctls ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
seabios: update to 1.10.0 release. # gpg: Signature made Thu 27 Oct 2016 15:50:54 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-seabios-20161027-2: seabios: update to 1.10.0 release. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d # gpg: Signature made Thu 27 Oct 2016 15:32:38 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-vga-20161027-1: virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Fam Zheng 提交于
Currently, the generated function body will do "strlen(arg)" but the argument could be 'char **' or 'char * const *'. Avoid that by excluding such cases in is_string check. Reported by patchew's "make docker-test-mingw@fedora". Suggested-by: NEric Blake <eblake@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1477453806-21097-1-git-send-email-famz@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Max Reitz 提交于
Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Since the order of keys in JSON filenames is not necessarily fixed, they should not be compared to fixed strings. This method takes a Python dict as a reference, parses a given JSON filename and compares both. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Add a new option "server" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring us to test each option whether its key has an "address." prefix. Therefore, we will then need to iterate through all options (including the "export" option which was not covered so far). Adding this iteration logic now will simplify adding the new option later. A nice side effect is that the user will not receive a long list of five options which are not supposed to be specified with a filename, but we can actually print the problematic option. Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Currently, a port that is passed along with a UNIX socket path is silently ignored. That is not exactly ideal, it should be an error instead. Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Commit 076003f5 added configuration for NFS with IMGOPTSSYNTAX enabled, but it didn't use the right variable name: $TEST_DIR_OPTS doesn't exist. This fixes the mistake. However, this doesn't make anything work that was broken before: The only way to get IMGOPTSSYNTAX is with -luks, but the combination of -luks and -nfs doesn't get qemu-img create commands right (because qemu-img create doesn't support --image-opts yet), so even after this fix some more work would be required to make the tests pass. Reported-by: NTomáš Golembiovský <tgolembi@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
It is unused now. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
It's the simpler interface to use for the raw format driver. Apart from that, this removes the last user of the AIO emulation implemented by bdrv_aio_ioctl(). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
This allows drivers to implement ioctls in a coroutine-based way. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
It is unused now. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
Instead of letting raw-posix use the bdrv_ioctl() abstraction to issue an ioctl to itself, just call ioctl() directly. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
All read/write functions already have a single coroutine-based function on the BlockBackend level through which all requests go (no matter what API style the external caller used) and which passes the requests down to the block node level. This patch exports a bdrv_co_ioctl() function and uses it to extend this mode of operation to ioctls. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
It is unused now. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
All read/write functions already have a single coroutine-based function on the BlockBackend level through which all requests go (no matter what API style the external caller used) and which passes the requests down to the block node level. This patch extends this mode of operation to discards. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-