[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-stream |
Date: |
Mon, 23 Apr 2012 16:39:45 +0100 |
This series is based on Luiz' latest QMP pull request at
git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
(d980956d5bfa9f4fd56c00a0b168c3c0f67bc0d2). This dependency is necessary
because this series conflicts with the block_stream -> block-stream rename.
Eric Blake raised concerns about the inability to start block jobs with a speed
limit. Current the user needs to follow up the block-stream command with
block-job-set-speed. There is a window of time while the new block job is
running but block-job-set-speed has not been processed yet.
This series adds an optional 'speed' parameter to block-stream so streaming can
be started with a speed limit that takes effect immediately.
I considered several other approaches, including adding a
default_block_job_speed field to BlockDriverState but ultimately the cleanest
solution is to pass in a speed parameter on job creation. This way we do not
change semantics of existing commands, we only add an optional parameter. We
also do not need to add state to BlockDriverState, which is already huge and
messy.
Stefan Hajnoczi (4):
block: use Error mechanism instead of -errno for block_job_create()
block: use Error mechanism instead of -errno for
block_job_set_speed()
block: add 'speed' optional parameter to block-stream
qemu-iotests: add block-stream with invalid speed value test
block.c | 35 +++++++++++++++++++++++++++--------
block/stream.c | 18 +++++++++---------
block_int.h | 19 +++++++++++++------
blockdev.c | 22 +++++++---------------
hmp-commands.hx | 4 ++--
hmp.c | 4 +++-
qapi-schema.json | 7 ++++++-
qerror.c | 4 ++++
qerror.h | 3 +++
qmp-commands.hx | 2 +-
tests/qemu-iotests/030 | 9 +++++++++
tests/qemu-iotests/030.out | 4 ++--
12 files changed, 86 insertions(+), 45 deletions(-)
--
1.7.9.5