All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: Alberto Garcia <berto@igalia.com>,
	qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v2 00/13] Add a 'x-blockdev-reopen' QMP command
Date: Wed,  6 Mar 2019 20:11:00 +0200	[thread overview]
Message-ID: <cover.1551895813.git.berto@igalia.com> (raw)

Hi,

here's a new version of the patches to add a new QMP command for
bdrv_reopen().

Refer to the cover letter of v1 for a complete description of the
feature:

   https://lists.gnu.org/archive/html/qemu-block/2019-01/msg00623.html

Regards,

Berto

v2:
- Patch 1: Update documentation, fix check in bdrv_drop_intermediate()
  and add a new one in bdrv_replace_node() [Kevin]
- Patch 2: Add a missing unfreeze call if commit_start() fails, and
  prevent a double unfreeze in commit_abort() [Kevin]
- Patch 4: Prevent double unfreeze in stream_abort() [Kevin]
- Patch 6: Update documentation and don't complain for a missing
  'backing' option if the driver does not support backing files [Kevin]
- Patch 7: Contextual differences due to changes in previous patches.
- Patch 8: Forbid changing the backing file if there are implicit
  nodes on the way. Simplify code and update the permission checks to
  handle a new backing file [Kevin, Berto]
- Patch 9: Remove BlockDriver.runtime_opts from the previous version
  and use only mutable_opts [Kevin]
- Patch 10: Compare bs->options with reopen_state->options to see what
  options the user is trying to reset [Kevin]
- Patch 13: Update the tests to reflect all the new changes.

v1: https://lists.gnu.org/archive/html/qemu-block/2019-01/msg00623.html
- Patch 10: forbid setting a new backing file with a different
  AioContext.
- Patch 13 (new): Remove unused parameter from bdrv_reopen_multiple.
- Patch 14: Acquire the AioContext before calling
  bdrv_reopen_multiple().
- Patch 15: More test cases.
- Patches 3, 8, 9, 11, 12: scripts/checkpatch.pl is more picky now
  with the format of multi-line comments, so correct them.

RFCv2: https://lists.gnu.org/archive/html/qemu-block/2018-11/msg00901.html

Output of backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/13:[0021] [FC] 'block: Allow freezing BdrvChild links'
002/13:[0010] [FC] 'block: Freeze the backing chain for the duration of the commit job'
003/13:[----] [--] 'block: Freeze the backing chain for the duration of the mirror job'
004/13:[0009] [FC] 'block: Freeze the backing chain for the duration of the stream job'
005/13:[----] [--] 'block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()'
006/13:[0009] [FC] 'block: Handle child references in bdrv_reopen_queue()'
007/13:[0004] [FC] 'block: Allow omitting the 'backing' option in certain cases'
008/13:[0118] [FC] 'block: Allow changing the backing file on reopen'
009/13:[down] 'block: Add a 'mutable_opts' field to BlockDriver'
010/13:[0070] [FC] 'block: Add bdrv_reset_options_allowed()'
011/13:[----] [--] 'block: Remove the AioContext parameter from bdrv_reopen_multiple()'
012/13:[----] [--] 'block: Add an 'x-blockdev-reopen' QMP command'
013/13:[0036] [FC] 'qemu-iotests: Test the x-blockdev-reopen QMP command'

Alberto Garcia (13):
  block: Allow freezing BdrvChild links
  block: Freeze the backing chain for the duration of the commit job
  block: Freeze the backing chain for the duration of the mirror job
  block: Freeze the backing chain for the duration of the stream job
  block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()
  block: Handle child references in bdrv_reopen_queue()
  block: Allow omitting the 'backing' option in certain cases
  block: Allow changing the backing file on reopen
  block: Add a 'mutable_opts' field to BlockDriver
  block: Add bdrv_reset_options_allowed()
  block: Remove the AioContext parameter from bdrv_reopen_multiple()
  block: Add an 'x-blockdev-reopen' QMP command
  qemu-iotests: Test the x-blockdev-reopen QMP command

 block.c                    | 390 ++++++++++++++++--
 block/commit.c             |  16 +
 block/file-posix.c         |   6 +
 block/mirror.c             |   8 +
 block/qcow2.c              |  25 ++
 block/raw-format.c         |   3 +
 block/replication.c        |   7 +-
 block/stream.c             |  21 +
 blockdev.c                 |  47 +++
 include/block/block.h      |  13 +-
 include/block/block_int.h  |  14 +
 qapi/block-core.json       |  42 ++
 qemu-io-cmds.c             |   4 +-
 tests/qemu-iotests/243     | 991 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/243.out |   5 +
 tests/qemu-iotests/group   |   1 +
 16 files changed, 1562 insertions(+), 31 deletions(-)
 create mode 100644 tests/qemu-iotests/243
 create mode 100644 tests/qemu-iotests/243.out

-- 
2.11.0

             reply	other threads:[~2019-03-06 18:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 18:11 Alberto Garcia [this message]
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 01/13] block: Allow freezing BdrvChild links Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 02/13] block: Freeze the backing chain for the duration of the commit job Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 03/13] block: Freeze the backing chain for the duration of the mirror job Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 04/13] block: Freeze the backing chain for the duration of the stream job Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 05/13] block: Add 'keep_old_opts' parameter to bdrv_reopen_queue() Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 06/13] block: Handle child references in bdrv_reopen_queue() Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 07/13] block: Allow omitting the 'backing' option in certain cases Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 08/13] block: Allow changing the backing file on reopen Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 09/13] block: Add a 'mutable_opts' field to BlockDriver Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 10/13] block: Add bdrv_reset_options_allowed() Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 11/13] block: Remove the AioContext parameter from bdrv_reopen_multiple() Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 12/13] block: Add an 'x-blockdev-reopen' QMP command Alberto Garcia
2019-03-06 18:11 ` [Qemu-devel] [PATCH v2 13/13] qemu-iotests: Test the x-blockdev-reopen " Alberto Garcia
2019-04-10 17:03   ` Max Reitz
2019-04-10 17:03     ` Max Reitz
2019-04-11 13:41     ` Alberto Garcia
2019-04-11 13:41       ` Alberto Garcia
2019-04-13  0:53       ` Max Reitz
2019-04-13  0:53         ` Max Reitz
2019-05-14 11:30         ` Alberto Garcia
2019-05-14 13:02           ` Max Reitz
2019-05-14 13:05             ` Alberto Garcia

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=cover.1551895813.git.berto@igalia.com \
    --to=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.