All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, eblake@redhat.com, armbru@redhat.com,
	crosa@redhat.com, ehabkost@redhat.com, berrange@redhat.com,
	pbonzini@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com,
	mreitz@redhat.com, kwolf@redhat.com, den@openvz.org
Subject: [PATCH v2 00/33] block: publish backup-top filter
Date: Thu, 20 May 2021 17:21:32 +0300	[thread overview]
Message-ID: <20210520142205.607501-1-vsementsov@virtuozzo.com> (raw)

Hi all!

v2:
01-02: new
03: don't bother with supporting empty child: we should never have such
    at this point
05: add comment
06: keep checking conflict with global
    add realized_set_allowed to qdev_prop_drive_iothread
07: improve cbw_cbw() name
    improve commit message
10: rebased on unchanged backup_calculate_cluster_size(). keep r-b  CHECK ME
12: new
13: drop extra bdrv_unref()
18: add compress local variable
    add comment about x-deprecated-compress
19: new, replacement for "[PATCH 17/21] block/block-copy: switch to fully set bitmap by default"
22: improve qapi documentation
23-33: test: a lot of refactoring

We have image fleecing scheme to export point-in-time state of active
disk (iotest 222):


                                      backup(sync=none)
                     ┌───────────────────────────────────────┐
                     ▼                                       │
┌────────────┐     ┌────────────────┐  backing             ┌─────────────┐
│ NBD export │ ─── │ temp qcow2 img │ ───────────────────▶ │ active disk │
└────────────┘     └────────────────┘                      └─────────────┘
                                                             ▲
┌────────────┐                                               │
│ guest blk  │ ──────────────────────────────────────────────┘
└────────────┘                        


Actually, backup job inserts a backup-top filter, so in detail it looks
like:

                                      backup(sync=none)
                     ┌───────────────────────────────────────┐
                     ▼                                       │
┌────────────┐     ┌────────────────┐  backing             ┌─────────────┐
│ NBD export │ ─── │ temp qcow2 img │ ───────────────────▶ │ active disk │
└────────────┘     └────────────────┘                      └─────────────┘
                     ▲                                       ▲
                     │ target                                │
                     │                                       │
┌────────────┐     ┌────────────────┐  backing               │
│ guest blk  │ ──▶ │   backup-top   │ ───────────────────────┘
└────────────┘     └────────────────┘

And job does nothing here. In a new blockdev world user is intended to
operate on node level, and insert/remove filters by hand. Let's get rid
of job in the scheme:

┌────────────┐     ┌────────────────┐  backing             ┌─────────────┐
│ NBD export │ ─── │ temp qcow2 img │ ───────────────────▶ │ active disk │
└────────────┘     └────────────────┘                      └─────────────┘
                     ▲                                       ▲
                     │ target                                │
                     │                                       │
┌────────────┐     ┌────────────────┐  backing               │
│ guest blk  │ ──▶ │   backup-top   │ ───────────────────────┘
└────────────┘     └────────────────┘


The series prepares qom-set to make possible inserting filters above
root node (patches 03-06), rename backup-top to copy-before-write, do
other preparations for publishing the filter, and finally publish it,
add qapi interface and test new fleecing scheme in 222 (first, some
good test refactoring).

Vladimir Sementsov-Ogievskiy (33):
  block: rename bdrv_replace_child to bdrv_replace_child_tran
  block: comment graph-modifying function not updating permissions
  block: introduce bdrv_replace_child_bs()
  block: introduce blk_replace_bs
  qdev-properties: PropertyInfo: add realized_set_allowed field
  qdev: allow setting drive property for realized device
  block: rename backup-top to copy-before-write
  block/backup: drop support for copy_range
  block-copy: always set BDRV_REQ_SERIALISING flag
  block/backup: move cluster size calculation to block-copy
  block/copy-before-write: relax permission requirements when no parents
  block/copy-before-write: drop extra bdrv_unref on failure path
  block/copy-before-write: use file child instead of backing
  block/copy-before-write: bdrv_cbw_append(): replace child at last
  block/copy-before-write: introduce cbw_init()
  block/copy-before-write: cbw_init(): rename variables
  block/copy-before-write: cbw_init(): use file child after attaching
  block/copy-before-write: cbw_init(): use options
  block/copy-before-write: initialize block-copy bitmap
  block/block-copy: make setting progress optional
  block/copy-before-write: make public block driver
  qapi: publish copy-before-write filter
  python/qemu/machine.py: refactor _qemu_args()
  python/qemu/machine: QEMUMachine: improve qmp() method
  iotests.py: VM: add own __enter__ method
  iotests/222: fix pylint and mypy complains
  iotests/222: constantly use single quotes for strings
  iotests: move 222 to tests/image-fleecing
  iotests.py: hmp_qemu_io: support qdev
  iotests/image-fleecing: proper source device
  iotests/image-fleecing: rename tgt_node
  iotests/image-fleecing: prepare for adding new test-case
  iotests/image-fleecing: add test-case for copy-before-write filter

 qapi/block-core.json                        |  30 ++-
 block/{backup-top.h => copy-before-write.h} |  26 +-
 include/block/block-copy.h                  |   4 +-
 include/block/block.h                       |   2 +
 include/hw/qdev-properties.h                |   1 +
 include/sysemu/block-backend.h              |   1 +
 block.c                                     |  52 +++-
 block/backup-top.c                          | 253 ------------------
 block/backup.c                              | 115 ++-------
 block/block-backend.c                       |   8 +
 block/block-copy.c                          |  98 ++++++-
 block/copy-before-write.c                   | 268 ++++++++++++++++++++
 hw/core/qdev-properties-system.c            |  43 +++-
 hw/core/qdev-properties.c                   |   6 +-
 MAINTAINERS                                 |   4 +-
 block/meson.build                           |   2 +-
 python/qemu/machine.py                      |  30 ++-
 tests/qemu-iotests/222                      | 159 ------------
 tests/qemu-iotests/222.out                  |  67 -----
 tests/qemu-iotests/283                      |  35 ++-
 tests/qemu-iotests/283.out                  |   4 +-
 tests/qemu-iotests/297                      |   2 +-
 tests/qemu-iotests/iotests.py               |   9 +-
 tests/qemu-iotests/tests/image-fleecing     | 192 ++++++++++++++
 tests/qemu-iotests/tests/image-fleecing.out | 139 ++++++++++
 25 files changed, 890 insertions(+), 660 deletions(-)
 rename block/{backup-top.h => copy-before-write.h} (56%)
 delete mode 100644 block/backup-top.c
 create mode 100644 block/copy-before-write.c
 delete mode 100755 tests/qemu-iotests/222
 delete mode 100644 tests/qemu-iotests/222.out
 create mode 100755 tests/qemu-iotests/tests/image-fleecing
 create mode 100644 tests/qemu-iotests/tests/image-fleecing.out

-- 
2.29.2



             reply	other threads:[~2021-05-20 14:25 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 14:21 Vladimir Sementsov-Ogievskiy [this message]
2021-05-20 14:21 ` [PATCH v2 01/33] block: rename bdrv_replace_child to bdrv_replace_child_tran Vladimir Sementsov-Ogievskiy
2021-05-31 12:52   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 02/33] block: comment graph-modifying function not updating permissions Vladimir Sementsov-Ogievskiy
2021-05-31 12:56   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 03/33] block: introduce bdrv_replace_child_bs() Vladimir Sementsov-Ogievskiy
2021-05-31 14:18   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 04/33] block: introduce blk_replace_bs Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 05/33] qdev-properties: PropertyInfo: add realized_set_allowed field Vladimir Sementsov-Ogievskiy
2021-05-31 15:51   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 06/33] qdev: allow setting drive property for realized device Vladimir Sementsov-Ogievskiy
2021-05-31 15:59   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 07/33] block: rename backup-top to copy-before-write Vladimir Sementsov-Ogievskiy
2021-05-31 16:08   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 08/33] block/backup: drop support for copy_range Vladimir Sementsov-Ogievskiy
2021-05-28 15:29   ` Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 09/33] block-copy: always set BDRV_REQ_SERIALISING flag Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 10/33] block/backup: move cluster size calculation to block-copy Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 11/33] block/copy-before-write: relax permission requirements when no parents Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 12/33] block/copy-before-write: drop extra bdrv_unref on failure path Vladimir Sementsov-Ogievskiy
2021-05-31 16:19   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 13/33] block/copy-before-write: use file child instead of backing Vladimir Sementsov-Ogievskiy
2021-05-31 16:22   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 14/33] block/copy-before-write: bdrv_cbw_append(): replace child at last Vladimir Sementsov-Ogievskiy
2021-05-31 16:55   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 15/33] block/copy-before-write: introduce cbw_init() Vladimir Sementsov-Ogievskiy
2021-05-31 16:57   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 16/33] block/copy-before-write: cbw_init(): rename variables Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 17/33] block/copy-before-write: cbw_init(): use file child after attaching Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 18/33] block/copy-before-write: cbw_init(): use options Vladimir Sementsov-Ogievskiy
2021-05-31 17:03   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 19/33] block/copy-before-write: initialize block-copy bitmap Vladimir Sementsov-Ogievskiy
2021-05-31 17:10   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 20/33] block/block-copy: make setting progress optional Vladimir Sementsov-Ogievskiy
2021-08-10 15:22   ` Hanna Reitz
2021-05-20 14:21 ` [PATCH v2 21/33] block/copy-before-write: make public block driver Vladimir Sementsov-Ogievskiy
2021-05-20 14:21 ` [PATCH v2 22/33] qapi: publish copy-before-write filter Vladimir Sementsov-Ogievskiy
2021-06-01  9:08   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 23/33] python/qemu/machine.py: refactor _qemu_args() Vladimir Sementsov-Ogievskiy
2021-06-01 10:05   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() method Vladimir Sementsov-Ogievskiy
2021-06-01 10:19   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 25/33] iotests.py: VM: add own __enter__ method Vladimir Sementsov-Ogievskiy
2021-06-01 10:58   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 26/33] iotests/222: fix pylint and mypy complains Vladimir Sementsov-Ogievskiy
2021-06-01 11:16   ` Max Reitz
2021-05-20 14:21 ` [PATCH v2 27/33] iotests/222: constantly use single quotes for strings Vladimir Sementsov-Ogievskiy
2021-06-01 11:17   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 28/33] iotests: move 222 to tests/image-fleecing Vladimir Sementsov-Ogievskiy
2021-06-01 11:17   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 29/33] iotests.py: hmp_qemu_io: support qdev Vladimir Sementsov-Ogievskiy
2021-06-01 11:19   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 30/33] iotests/image-fleecing: proper source device Vladimir Sementsov-Ogievskiy
2021-06-01 11:29   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 31/33] iotests/image-fleecing: rename tgt_node Vladimir Sementsov-Ogievskiy
2021-06-01 11:46   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 32/33] iotests/image-fleecing: prepare for adding new test-case Vladimir Sementsov-Ogievskiy
2021-06-01 11:47   ` Max Reitz
2021-05-20 14:22 ` [PATCH v2 33/33] iotests/image-fleecing: add test-case for copy-before-write filter Vladimir Sementsov-Ogievskiy
2021-06-01 12:02   ` Max Reitz
2021-05-31 17:11 ` [PATCH v2 00/33] block: publish backup-top filter Max Reitz
2021-05-31 17:35   ` Vladimir Sementsov-Ogievskiy

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=20210520142205.607501-1-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@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.