qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC C0/2] support allocation-map for block-dirty-bitmap-merge
@ 2021-04-27 11:11 Vladimir Sementsov-Ogievskiy
  2021-04-27 11:11 ` [PATCH 1/2] qapi: block-dirty-bitmap-merge: support allocation maps Vladimir Sementsov-Ogievskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-04-27 11:11 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, armbru, mreitz, kwolf, jsnow, vsementsov, eblake,
	pkrempa, nshirokovskiy, den

Hi all!

It's a simpler alternative for
"[PATCH v4 0/5] block: add block-dirty-bitmap-populate job"
  <20200902181831.2570048-1-eblake@redhat.com>
  https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg00978.html
  https://patchew.org/QEMU/20200902181831.2570048-1-eblake@redhat.com/

Since we have "coroutine: true" feature for qmp commands, I think,
maybe we can merge allocation status to bitmap without bothering with
new block-job?

It's an RFC:

1. Main question: is it OK as a simple blocking command, even in a
coroutine mode. It's a lot simpler, and it can be simply used in a
transaction with other bitmap commands.

2. Transaction support is not here now. Will add in future version, if
general approach is OK.

3. I just do bdrv_co_enter() / bdrv_co_leave() like it is done in the
only coroutine qmp command - block_resize(). I'm not sure how much is it
correct.

4. I don't do any "drain". I think it's not needed, as intended usage
is to merge block-status to _active_ bitmap. So all concurrent
operations will just increase dirtyness of the bitmap and it is OK.

5. Probably we still need to create some BdrvChild to avoid node resize
during the loop of block-status querying.

6. Test is mostly copied from parallels-read-bitmap, I'll refactor it in
next version to avoid copy-paste.

7. Probably patch 01 is better be split into 2-3 patches.

Vladimir Sementsov-Ogievskiy (2):
  qapi: block-dirty-bitmap-merge: support allocation maps
  iotests: add allocation-map-to-bitmap

 qapi/block-core.json                          | 31 ++++++++-
 include/block/block_int.h                     |  4 ++
 block/dirty-bitmap.c                          | 42 ++++++++++++
 block/monitor/bitmap-qmp-cmds.c               | 55 +++++++++++++---
 .../tests/allocation-map-to-bitmap            | 64 +++++++++++++++++++
 .../tests/allocation-map-to-bitmap.out        |  9 +++
 6 files changed, 195 insertions(+), 10 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/allocation-map-to-bitmap
 create mode 100644 tests/qemu-iotests/tests/allocation-map-to-bitmap.out

-- 
2.29.2



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-28  5:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 11:11 [PATCH RFC C0/2] support allocation-map for block-dirty-bitmap-merge Vladimir Sementsov-Ogievskiy
2021-04-27 11:11 ` [PATCH 1/2] qapi: block-dirty-bitmap-merge: support allocation maps Vladimir Sementsov-Ogievskiy
2021-04-27 11:59   ` Vladimir Sementsov-Ogievskiy
2021-04-27 11:11 ` [PATCH 2/2] iotests: add allocation-map-to-bitmap Vladimir Sementsov-Ogievskiy
2021-04-27 11:46 ` [PATCH RFC C0/2] support allocation-map for block-dirty-bitmap-merge Vladimir Sementsov-Ogievskiy
2021-04-27 18:24 ` John Snow
2021-04-28  0:49   ` Vladimir Sementsov-Ogievskiy
2021-04-28  5:23   ` Markus Armbruster

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).