diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2015-07-07 19:12:45 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2015-07-07 19:12:45 +0100 |
| commit | 30c6672aa4b4bc9bdba3a7e46c49bba191660143 (patch) | |
| tree | 54f3f6fdf324a65a5d654cd18b6fb9ce1b934395 /block.c | |
| parent | 9861b71fd63f04175fddd1e93a417bae4a7808d7 (diff) | |
| parent | 970311646a701eecb103eb28093e8924d2fa6861 (diff) | |
| download | focaccia-qemu-30c6672aa4b4bc9bdba3a7e46c49bba191660143.tar.gz focaccia-qemu-30c6672aa4b4bc9bdba3a7e46c49bba191660143.zip | |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request v2: * Drop block/nfs patch since it exposes an unfinished QAPI interface [kwolf] # gpg: Signature made Tue Jul 7 14:29:47 2015 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: blockjob: add block_job_release function block/raw-posix: Don't think /dev/fd/<NN> is a floppy drive. block: Use bdrv_drain to replace uncessary bdrv_drain_all block: Initialize local_err in bdrv_append_temp_snapshot block: update bdrv_drain_all()/bdrv_drain() comments qcow2: remove unnecessary check Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block.c')
| -rw-r--r-- | block.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block.c b/block.c index 7e130cc528..5e80336e9f 100644 --- a/block.c +++ b/block.c @@ -1271,7 +1271,7 @@ int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp) QemuOpts *opts = NULL; QDict *snapshot_options; BlockDriverState *bs_snapshot; - Error *local_err; + Error *local_err = NULL; int ret; /* if snapshot, we create a temporary backing file and open it @@ -1841,9 +1841,9 @@ void bdrv_close(BlockDriverState *bs) if (bs->job) { block_job_cancel_sync(bs->job); } - bdrv_drain_all(); /* complete I/O */ + bdrv_drain(bs); /* complete I/O */ bdrv_flush(bs); - bdrv_drain_all(); /* in case flush left pending I/O */ + bdrv_drain(bs); /* in case flush left pending I/O */ notifier_list_notify(&bs->close_notifiers, bs); if (bs->drv) { @@ -3906,7 +3906,7 @@ void bdrv_attach_aio_context(BlockDriverState *bs, void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context) { - bdrv_drain_all(); /* ensure there are no in-flight requests */ + bdrv_drain(bs); /* ensure there are no in-flight requests */ bdrv_detach_aio_context(bs); |