[PATCH v3 0/6] block: add block-dirty-bitmap-populate job

Eric Blake posted 6 patches 3 years, 11 months ago
Test FreeBSD passed
Test asan passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200619195621.58740-1-eblake@redhat.com
Maintainers: Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>, John Snow <jsnow@redhat.com>, Markus Armbruster <armbru@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
qapi/block-core.json          |   66 +
qapi/job.json                 |    6 +-
qapi/transaction.json         |    2 +
include/block/block_int.h     |   21 +
block/bitmap-populate.c       |  207 ++
blockdev.c                    |  104 +-
blockjob.c                    |    3 +-
MAINTAINERS                   |    1 +
block/Makefile.objs           |    1 +
tests/qemu-iotests/257        |  110 +-
tests/qemu-iotests/298        |  232 ++
tests/qemu-iotests/298.out    | 4544 +++++++++++++++++++++++++++++++++
tests/qemu-iotests/bitmaps.py |  131 +
tests/qemu-iotests/group      |    1 +
14 files changed, 5300 insertions(+), 129 deletions(-)
create mode 100644 block/bitmap-populate.c
create mode 100755 tests/qemu-iotests/298
create mode 100644 tests/qemu-iotests/298.out
create mode 100644 tests/qemu-iotests/bitmaps.py
[PATCH v3 0/6] block: add block-dirty-bitmap-populate job
Posted by Eric Blake 3 years, 11 months ago
[From John's original cover letter:]
This is a new (very small) block job that writes a pattern into a
bitmap. The only pattern implemented is the top allocation information.

This can be used to "recover" an incremental bitmap chain if an external
snapshot was taken without creating a new bitmap first: any writes made
to the image will be reflected by the allocation status and can be
written back into a bitmap.

This is useful for e.g. libvirt managing backup chains if a user creates
an external snapshot outside of libvirt.

v3:
 - Addressed a bit more feedback
 - Make it easier to decide if we want an x- prefix if we think there
 are more tweaks to be made to the interface
 - Drop dependency on John's JobRunner iotest series
 - Renumber the new iotest

I know there was a lot of discussion about whether there are
optimizations to be made with populating directly into the target
bitmap rather than into a temporary that then gets merged in at the
completion of the job, but the QMP aspect seems fairly stable.  Even
so, we may still want to consider using an x- prefix until we know for
sure whether libvirt can make decent use of the interface.

Eric Blake (1):
  bitmaps: Use x- prefix for block-dirty-bitmap-popluate

John Snow (5):
  block: add bitmap-populate job
  blockdev: combine DriveBackupState and BlockdevBackupState
  qmp: expose block-dirty-bitmap-populate
  iotests: move bitmap helpers into their own file
  iotests: add 298 for block-dirty-bitmap-populate

 qapi/block-core.json          |   66 +
 qapi/job.json                 |    6 +-
 qapi/transaction.json         |    2 +
 include/block/block_int.h     |   21 +
 block/bitmap-populate.c       |  207 ++
 blockdev.c                    |  104 +-
 blockjob.c                    |    3 +-
 MAINTAINERS                   |    1 +
 block/Makefile.objs           |    1 +
 tests/qemu-iotests/257        |  110 +-
 tests/qemu-iotests/298        |  232 ++
 tests/qemu-iotests/298.out    | 4544 +++++++++++++++++++++++++++++++++
 tests/qemu-iotests/bitmaps.py |  131 +
 tests/qemu-iotests/group      |    1 +
 14 files changed, 5300 insertions(+), 129 deletions(-)
 create mode 100644 block/bitmap-populate.c
 create mode 100755 tests/qemu-iotests/298
 create mode 100644 tests/qemu-iotests/298.out
 create mode 100644 tests/qemu-iotests/bitmaps.py

-- 
2.27.0


Re: [PATCH v3 0/6] block: add block-dirty-bitmap-populate job
Posted by Kevin Wolf 3 years, 10 months ago
Am 19.06.2020 um 21:56 hat Eric Blake geschrieben:
> [From John's original cover letter:]
> This is a new (very small) block job that writes a pattern into a
> bitmap. The only pattern implemented is the top allocation information.
> 
> This can be used to "recover" an incremental bitmap chain if an external
> snapshot was taken without creating a new bitmap first: any writes made
> to the image will be reflected by the allocation status and can be
> written back into a bitmap.
> 
> This is useful for e.g. libvirt managing backup chains if a user creates
> an external snapshot outside of libvirt.
> 
> v3:
>  - Addressed a bit more feedback
>  - Make it easier to decide if we want an x- prefix if we think there
>  are more tweaks to be made to the interface
>  - Drop dependency on John's JobRunner iotest series
>  - Renumber the new iotest
> 
> I know there was a lot of discussion about whether there are
> optimizations to be made with populating directly into the target
> bitmap rather than into a temporary that then gets merged in at the
> completion of the job, but the QMP aspect seems fairly stable.  Even
> so, we may still want to consider using an x- prefix until we know for
> sure whether libvirt can make decent use of the interface.

Fair enough, as long as everyone agrees that the QMP aspect includes
that merging the bits only at the end of the job is an implementation
detail and not something that client may rely on.

Kevin