From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Jeff Cody <jcody@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer
Date: Fri, 8 Apr 2016 11:00:07 +0100 [thread overview]
Message-ID: <20160408100007.GE28423@stefanha-x1.localdomain> (raw)
In-Reply-To: <cover.1459776815.git.berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 6271 bytes --]
On Mon, Apr 04, 2016 at 04:43:50PM +0300, Alberto Garcia wrote:
> Hi!
>
> Half a year later :) here's the new version of the intermediate block
> streaming patches.
CCing Jeff Cody, block jobs maintainer.
> Quick summary: the feature was already working since June but there
> were two problems that made it impossible to merge the patches. Here's
> the full description:
>
> https://lists.gnu.org/archive/html/qemu-block/2015-12/msg00180.html
>
> And here's the TL;DR version:
>
> 1) Opening a BDS in read-write mode with bdrv_reopen() has the side
> effect of reopening its backing chain in read-only mode.
>
> 2) bdrv_reopen() can trigger the completion of an existing block
> job. If that job modifies the backing chain in which that reopen
> call is operating, it can crash QEMU.
>
> Now, these problems are only relevant if there are two block jobs
> running at the same time in the same backing chain. This is a nice
> feature, but it's not essential for the intermediate block streaming
> operation. Therefore I decided to disable it in this version of the
> series.
>
> The way it works is that if you run block-stream on an intermediate
> node, it will block the active layer as well, preventing other block
> jobs in the same chain.
>
> Other than that there are no significant changes compared to v8, but a
> couple of things are different:
>
> - The code has been rebased
> - The patch that introduced block_job_next() has been split into
> several: one that adds the function and the rest that use it in
> different parts of the QEMU code.
> - Some patches have already been merged into QEMU so they have been
> removed from the series.
> - The test that ran several block-stream operations in parallel now
> verifies that they are forbidden.
>
> I think that's all. Comments and questions are welcome!
>
> Berto
>
> v9:
> - Rebase the code
> - Block the active layer in order to forbid other block jobs in the
> same chain.
> - Split the patch that adds block_job_next() into 4 (new patches 1-4).
> - Replace the test that performs several block-stream operations in
> parallel with one that check that they're forbidden.
> - Remove patches that have already been merged.
>
> v8: https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg05754.html
> - Rebased on top of Stefan's block branch (0a35bce416)
> - The loop that pauses the block jobs in bdrv_drain_all() is now split
> in two: one that iterates the list of block jobs to stop them, and
> one that iterates the root bds in order to get the aio contexts.
>
> v7: https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg02580.html
> - Rebased against the current master
> - Updated bdrv_drain_all() to use the new block_job_next() API.
>
> v6: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03046.html
> - fix the no-op test following Max's suggestions
>
> v5: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03006.html
> - Fix a few typos
> - Minor documentation updates
> - Update test_stream_partial() to test no-ops
> - New test case: test_stream_parallel()
> - New test case: test_stream_overlapping()
>
> v4: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg01878.html
> - Refactor find_block_job to use the error from bdrv_lookup_bs()
> - Don't use QERR_DEVICE_IN_USE in block_job_create() since we can be
> dealing with nodes now.
> - Fix @device comment in the BlockJobInfo documentation
> - stream_start(): simplify the bdrv_reopen() call and use
> bdrv_get_device_or_node_name() for error messages.
> - Use a different variable name for BlockDriverState *i
> - Documentation fixes in docs/live-block-ops.txt
> - Update iotest 30 since now test_device_not_found() returns
> GenericError
> - Fix test case test_stream_partial()
> - Add new test case test_stream_intermediate()
> - Fix typos
>
> v3: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00806.html
> - Keep a list of block jobs and make qmp_query_block_jobs() iterate
> over it.
>
> v2: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg04798.html
> - The 'block-stream' command does not have a 'node-name' parameter
> anymore and reuses 'device' for that purpose.
> - Block jobs can now be owned by any intermediate node, and not just
> by the ones at the root. query-block-jobs is updated to reflect that
> change.
> - The 'device' parameter of all 'block-job-*' commands can now take a
> node name.
> - The BlockJobInfo type and all BLOCK_JOB_* events report the node
> name in the 'device' field if the node does not have a device name.
> - All intermediate nodes are blocked (and checked for blockers) during
> the streaming operation.
>
> v1: https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg04116.html
>
> Alberto Garcia (11):
> block: keep a list of block jobs
> block: use the block job list in bdrv_drain_all()
> block: use the block job list in qmp_query_block_jobs()
> block: use the block job list in bdrv_close()
> block: allow block jobs in any arbitrary node
> block: Support streaming to an intermediate layer
> block: Add QMP support for streaming to an intermediate layer
> docs: Document how to stream to an intermediate layer
> qemu-iotests: test streaming to an intermediate layer
> qemu-iotests: test overlapping block-stream operations
> qemu-iotests: test non-overlapping block-stream operations
>
> block.c | 29 ++++---------
> block/io.c | 21 ++++++----
> block/stream.c | 39 ++++++++++++++++-
> blockdev.c | 68 ++++++++++++++++++------------
> blockjob.c | 18 +++++++-
> docs/live-block-ops.txt | 31 +++++++++-----
> docs/qmp-events.txt | 8 ++--
> include/block/block_int.h | 5 ++-
> include/block/blockjob.h | 14 +++++++
> qapi/block-core.json | 30 ++++++++------
> tests/qemu-iotests/030 | 101 ++++++++++++++++++++++++++++++++++++++++++++-
> tests/qemu-iotests/030.out | 4 +-
> 12 files changed, 276 insertions(+), 92 deletions(-)
>
> --
> 2.8.0.rc3
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2016-04-08 10:00 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 13:43 [Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 01/11] block: keep a list of block jobs Alberto Garcia
2016-04-27 11:59 ` Max Reitz
2016-04-29 14:22 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all() Alberto Garcia
2016-04-27 12:04 ` Max Reitz
2016-04-27 12:08 ` Alberto Garcia
2016-04-29 14:25 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs() Alberto Garcia
2016-04-27 12:09 ` Max Reitz
2016-04-29 14:32 ` Kevin Wolf
2016-05-02 13:06 ` Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close() Alberto Garcia
2016-04-27 12:14 ` Max Reitz
2016-04-29 14:38 ` Kevin Wolf
2016-05-02 13:42 ` Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node Alberto Garcia
2016-04-27 12:30 ` Max Reitz
2016-04-27 14:59 ` Alberto Garcia
2016-04-29 15:00 ` Kevin Wolf
2016-05-06 10:00 ` Alberto Garcia
2016-05-06 17:54 ` John Snow
2016-05-09 7:06 ` Kevin Wolf
2016-05-09 11:59 ` Alberto Garcia
2016-04-29 15:25 ` Eric Blake
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 06/11] block: Support streaming to an intermediate layer Alberto Garcia
2016-04-27 13:04 ` Max Reitz
2016-04-28 9:23 ` Alberto Garcia
2016-04-29 15:07 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for " Alberto Garcia
2016-04-27 13:34 ` Max Reitz
2016-04-28 12:20 ` Alberto Garcia
2016-04-29 15:18 ` Kevin Wolf
2016-05-03 12:50 ` Alberto Garcia
2016-05-03 13:23 ` Kevin Wolf
2016-05-03 13:33 ` Alberto Garcia
2016-05-03 13:48 ` Kevin Wolf
2016-05-03 15:09 ` Alberto Garcia
[not found] ` <w517fezo0al.fsf@maestria.local.igalia.com>
2016-05-12 15:04 ` Kevin Wolf
[not found] ` <w514ma3nwbl.fsf@maestria.local.igalia.com>
2016-05-12 15:28 ` Kevin Wolf
2016-05-17 14:26 ` Alberto Garcia
2016-05-17 14:47 ` Kevin Wolf
2016-05-17 14:54 ` Alberto Garcia
2016-04-29 15:11 ` Kevin Wolf
2016-05-03 12:53 ` Alberto Garcia
2016-05-03 13:18 ` Kevin Wolf
2016-05-03 13:29 ` Alberto Garcia
2016-04-29 15:29 ` Eric Blake
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 08/11] docs: Document how to stream " Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 09/11] qemu-iotests: test streaming " Alberto Garcia
2016-04-04 13:44 ` [Qemu-devel] [PATCH v9 10/11] qemu-iotests: test overlapping block-stream operations Alberto Garcia
2016-04-27 13:48 ` Max Reitz
2016-04-27 15:02 ` Alberto Garcia
2016-04-04 13:44 ` [Qemu-devel] [PATCH v9 11/11] qemu-iotests: test non-overlapping " Alberto Garcia
2016-04-27 13:50 ` Max Reitz
2016-04-08 10:00 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160408100007.GE28423@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=berto@igalia.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).