diff options
| author | Alberto Garcia | 2016-10-28 09:08:02 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2016-10-31 16:51:14 +0100 |
| commit | c0778f6693213d0d6bfa7bee8045374a798db750 (patch) | |
| tree | f3e9b270885565b056a7a6accabc4f5b785d8820 /scripts | |
| parent | qapi: allow blockdev-add for ssh (diff) | |
| download | qemu-c0778f6693213d0d6bfa7bee8045374a798db750.tar.gz qemu-c0778f6693213d0d6bfa7bee8045374a798db750.tar.xz qemu-c0778f6693213d0d6bfa7bee8045374a798db750.zip | |
block: Add bdrv_drain_all_{begin,end}()
bdrv_drain_all() doesn't allow the caller to do anything after all
pending requests have been completed but before block jobs are
resumed.
This patch splits bdrv_drain_all() into _begin() and _end() for that
purpose. It also adds aio_{disable,enable}_external() calls to disable
external clients in the meantime.
An important restriction of this split is that no new block jobs or
BlockDriverStates can be created between the bdrv_drain_all_begin()
and bdrv_drain_all_end() calls. This is not a concern now because
we'll only be using this in bdrv_reopen_multiple(), but it must be
dealt with if we ever have other uses cases in the future.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
